Package com.github.tonivade.purefun.type
Interface Eval<A>
- Type Parameters:
A- result of the computation
- All Known Implementing Classes:
Eval.Defer,Eval.Done,Eval.FlatMapped
public sealed interface Eval<A>
extends EvalOf<A>, Bindable<Eval<?>,A>
permits Eval.Done<A>, Eval.Defer<A>, Eval.FlatMapped<A,B>
This is a monad that allows to control the evaluation of a computation or a value.
There are 3 basic strategies:
- Eval.now(): evaluated immediately
- Eval.later(): the computation is evaluated later, but only the first time, the result is memoized.
- Eval.always(): the computation is evaluated later, but is always executed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classstatic final class -
Field Summary
Fields -
Method Summary