1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 06:08:31 +01:00
dotSCAD/docs/lib3x-some.md
2022-06-06 13:11:46 +08:00

397 B

some

The some function tests whether at least one element in the list passes 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/some.scad>

isOdd = function(elem) elem % 2 == 1;
assert(some([1, 30, 39, 29, 10, 13], isOdd));