an input range
value to search for
which index from the end 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);
0.0.1
Finds the first element in a range that equals some value