mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-18 22:58:04 +01:00
add every
This commit is contained in:
parent
c46b03b788
commit
333fbfc728
@ -12,4 +12,6 @@ New modules/functions
|
||||
|
||||
- `angles_between`
|
||||
- `spherical_coordinate`
|
||||
- `util/every`
|
||||
- `util/some`
|
||||
|
||||
|
5
src/util/every.scad
Normal file
5
src/util/every.scad
Normal file
@ -0,0 +1,5 @@
|
||||
function _every(lt, assert_func, leng, i = 0) =
|
||||
i == leng ? true :
|
||||
assert_func(lt[i]) ? _every(lt, assert_func, leng, i + 1) : false;
|
||||
|
||||
function every(lt, assert_func) = _every(lt, assert_func, len(lt));
|
Loading…
x
Reference in New Issue
Block a user