Methods

indexΒΆ

index(arr:Arr, predicate:Any)

Find index of first value that satisfies the predicate. TODO: Make it work on anything with each() method.
Source: stdlib.ngs:1204

arr

Items to look at

predicate

Test function

Returns

Int or null

Example

[1,2,11,3,4].index(X>10)  # 2