Finds the first element in a range that equals some value
an input range
value to search for
which index to start searching from
An Optional!T
import optional; assert([1, 2, 1, 2].indexOf(2) == some(1)); assert([1, 2, 1, 2].indexOf(2, 2) == some(3)); assert([1, 2, 1, 2].indexOf(3) == none);
See Implementation
0.0.1
Finds the first element in a range that equals some value