//arrow-core/arrow.core/Eval/Companion

Companion

common object Companion

Functions

Name Summary
always common
@JvmStatic
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.
defer common
@JvmStatic
inline fun <A> defer(crossinline f: () -> Eval<A>): Eval<A>
later common
@JvmStatic
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.
now common
@JvmStatic
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
raise common
@JvmStatic
fun raise(t: Throwable): Eval<Nothing>

Do you like Arrow?

Arrow Org
<