position method
Searches for an element in an iterator, returning its index.
Implementation
@override
Option<int> position(bool Function(T) f) {
var index = 0;
for (final element in this) {
if (f(element)) {
return Some(index);
}
index++;
}
return None;
}