Companion

object Companion

Functions

Link copied to clipboard
inline fun <A> always(crossinline f: () -> A): Eval.Always<A>

Creates an Eval instance from a function deferring it's evaluation until .value() is invoked recomputing each time .value() is invoked.

Link copied to clipboard
inline fun <A> defer(crossinline f: () -> Eval<A>): Eval<A>
Link copied to clipboard
inline fun <A> later(crossinline f: () -> A): Eval.Later<A>

Creates an Eval instance from a function deferring it's evaluation until .value() is invoked memoizing the computed value.

Link copied to clipboard
fun <A> now(a: A): Eval<A>

Creates an Eval instance from an already constructed value but still defers evaluation when chaining expressions with map and flatMap

Link copied to clipboard
fun raise(t: Throwable): Eval<Nothing>