mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-25 05:51:41 +02:00
add docs
This commit is contained in:
16
docs/lib3x-find_index.md
Normal file
16
docs/lib3x-find_index.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# find_index
|
||||
|
||||
Returns the index of the first element in the list that satisfies the testing function. If no element passed the test, it returns -1.
|
||||
|
||||
**Since:** 3.0
|
||||
|
||||
## Parameters
|
||||
|
||||
- `lt` : The list.
|
||||
- `test` : the testing function.
|
||||
|
||||
## Examples
|
||||
|
||||
use <util/find_index.scad>;
|
||||
|
||||
assert(find_index([10, 20, 30, 40], function(e) e > 10) == 1);
|
Reference in New Issue
Block a user