filterOrFail method
Filters the success value of this ZIO with the given predicate
, failing
with onFalse
if the predicate fails.
Implementation
ZIO<R, E, A> filterOrFail(
bool Function(A _) predicate,
E Function(A _) onFalse,
) =>
flatMapEither((a) => Either.fromPredicate(a, predicate, onFalse));