filter abstract method

Option<T> filter(
  1. @noFutures bool noFutures(
    1. T value
    )
)

Returns None if the predicate noFutures returns false. Otherwise, returns the original Option.

⚠️ Callback must not throw

Option<T> has no Err variant. Throwing predicates escape to the caller. If your predicate can fail, lift it via Sync(() => p(value)).

Implementation

Option<T> filter(@noFutures bool Function(T value) noFutures);