I know about Iterator in std::iter - Rust
Which takes an iterator + predicate, and returns an Option<Item>
of the first elem that satisfies the condition.
I want something slightly different:
the element to the LEFT of the first element that satisfies the condition (if item 0 satisfies, return NONE)
the element to the RIGHT of the first element that satisfies the condition (if last item, return NONE)
Now, I can certainly do this manually with a for loop and some book keeping. However, is there an idiomatic / pure way to do this ?