//arrow-core/arrow.core/ensure

ensure

common inline fun <A, B> Either<A, B>.ensure(error: () -> A, predicate: (B) -> Boolean): Either<A, B>

inline fun <A> Option<A>.ensure(error: () -> Unit, predicate: (A) -> Boolean): Option<A>

Do you like Arrow?

Arrow Org
<