Package-level declarations

Types

Link copied to clipboard
object either
Link copied to clipboard
fun interface EitherEffect<E, A> : Effect<Either<E, A>>
Link copied to clipboard
object eval
Link copied to clipboard
fun interface EvalEffect<A> : Effect<Eval<A>>
Link copied to clipboard
object nullable
Link copied to clipboard
fun interface NullableEffect<A> : Effect<A?>
Link copied to clipboard
object option
Link copied to clipboard
fun interface OptionEffect<A> : Effect<Option<A>>
Link copied to clipboard
fun interface RestrictedEitherEffect<E, A> : EitherEffect<E, A>
Link copied to clipboard
fun interface RestrictedEvalEffect<A> : EvalEffect<A>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object result
Link copied to clipboard

DSL Receiver Syntax for result.

Functions

Link copied to clipboard
suspend fun <B : Any> NullableEffect<*>.ensureNotNull(value: B?): B
suspend fun <B : Any> OptionEffect<*>.ensureNotNull(value: B?): B

Ensures that value is not null. When the value is not null, then it will be returned as non null and the check value is now smart-checked to non-null. Otherwise, if the value is null then the option binding will short-circuit with None.

suspend fun <E, B : Any> EitherEffect<E, *>.ensureNotNull(value: B?, orLeft: () -> E): B

Ensures that value is not null. When the value is not null, then it will be returned as non null and the check value is now smart-checked to non-null. Otherwise, if the value is null then the either binding will short-circuit with orLeft inside of Either.Left.