The type of elements in the array.
The Opt instance containing an array.
A predicate function to test each element.
A new Opt containing the found element or None if no element matches the predicate or if the Opt is None.
opt([1, 2, 3, 4]).findIn(x => x > 2) // Some(3)
opt([1, 2, 3, 4]).findIn(x => x > 5) // None
none.findIn(x => x > 2) // None
Searches for an element within an array inside the Opt instance that matches the given predicate.
This method will return a new Opt containing the first element that satisfies the predicate function. If the Opt instance is None or the value inside is not an array, it will return None.