Package fj.data

Class Eval.Later<A>

  • Enclosing class:
    Eval<A>

    private static final class Eval.Later<A>
    extends Eval<A>
    Represents a lazy computation that is evaluated only once.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private P1<A> memo  
    • Constructor Summary

      Constructors 
      Constructor Description
      Later​(F0<A> producer)  
    • Field Detail

      • memo

        private final P1<A> memo
    • Constructor Detail

      • Later

        Later​(F0<A> producer)
    • Method Detail

      • value

        public final A value()
        Description copied from class: Eval
        Evaluates the computation and return its result. Depending on whether the current instance is lazy or eager the computation may or may not happen at this point.
        Specified by:
        value in class Eval<A>
        Returns:
        a result of this computation.