Interface Eval<A>

Type Parameters:
A - result of the computation
All Superinterfaces:
Bindable<Eval<?>,A>, EvalOf<A>, Kind<Eval<?>,A>, Mappable<Eval<?>,A>
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.