- index(arr:Arr, predicate:Any, start:Int=0, dflt:Any=) Source: stdlib.ngs:1919
Find index of first value that satisfies the predicate. TODO: Make it work on anything with each() method. In future, will throw exception if element is not found and default is not provided. Now returns null for backwards compatibilty in this case.
arr Items to look at predicate Test function start Index to start search at dflt default value to return when element is not found
ReturnsInt or dflt. Temporary also null, for backwards compatibilty.
[1,2,11,3,4].index(X>10) # 2