arrow-core-data / arrow.core / Eval / Later


data class Later<out A> : Eval<A>

Construct a lazy Eval instance.

This type should be used for most “lazy” values. In some sense it is equivalent to using a lazy val.

When caching is not required or desired (e.g. if the value produced may be large) prefer Always. When there is no computation necessary, prefer Now.

Once Later has been evaluated, the closure (and any values captured by the closure) will not be retained, and will be available for garbage collection.


<init> Construct a lazy Eval instance.Later(f: () -> A)


value val value: A


memoize fun memoize(): Eval<A>
value fun value(): A

Do you like Arrow?

Arrow Org