arrow-mtl / arrow.mtl.typeclasses / MonadFilterContinuation

MonadFilterContinuation

open class MonadFilterContinuation<F, A> : MonadContinuation<F, A>

Constructors

<init> MonadFilterContinuation(MF: MonadFilter<F>, context: CoroutineContext = EmptyCoroutineContext)

Properties

MF val MF: MonadFilter<F>
context open val context: CoroutineContext

Functions

bindWithFilter suspend fun <B> Kind<F, B>.bindWithFilter(f: (B) -> Boolean): B
Binds only if the given predicate matches the inner value otherwise binds into the Monad empty() value on MonadFilter instances
continueIf fun continueIf(predicate: Boolean): Unit
Short circuits monadic bind if predicate == false return the monad empty value.
resumeWith open fun resumeWith(result: <ERROR CLASS><Kind<F, A>>): Unit