1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-01 02:33:00 +02:00

add every

This commit is contained in:
Justin Lin
2021-02-10 08:39:15 +08:00
parent 7183015fe1
commit 399c93e2d5
3 changed files with 28 additions and 0 deletions

17
docs/lib3x-every.md Normal file
View File

@@ -0,0 +1,17 @@
# every
The `every` function tests whether all elements in the list pass the test implemented by the provided function.
**Since:** 3.0
## Parameters
- `lt` : the list.
- `test` : a test function that accepts an element and returns `true` or `false`.
## Examples
use <util/every.scad>;
biggerThanZero = function(elem) elem > 0;
assert(every([1, 30, 39, 29, 10, 13], biggerThanZero));