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

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.

Constructors

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

Properties

value val value: A

Functions

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

Do you like Arrow?

Arrow Org
<