Packages

final class Always[A] extends Leaf[A]

Construct a lazy Eval[A] instance.

This type can be used for "lazy" values. In some sense it is equivalent to using a Function0 value.

This type will evaluate the computation every time the value is required. It should be avoided except when laziness is required and caching must be avoided. Generally, prefer Later.

Source
Eval.scala
Linear Supertypes
Leaf[A], Eval[A], Serializable, Serializable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Always
  2. Leaf
  3. Eval
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Always(f: () ⇒ A)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def flatMap[B](f: (A) ⇒ Eval[B]): Eval[B]

    Lazily perform a computation based on an Eval[A], using the function f to produce an Eval[B] given an A.

    Lazily perform a computation based on an Eval[A], using the function f to produce an Eval[B] given an A.

    This call is stack-safe -- many .flatMap calls may be chained without consumed additional stack during evaluation. It is also written to avoid left-association problems, so that repeated calls to .flatMap will be efficiently applied.

    Computation performed in f is always lazy, even when called on an eager (Now) instance.

    Definition Classes
    Eval
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def map[B](f: (A) ⇒ B): Eval[B]

    Transform an Eval[A] into an Eval[B] given the transformation function f.

    Transform an Eval[A] into an Eval[B] given the transformation function f.

    This call is stack-safe -- many .map calls may be chained without consumed additional stack during evaluation.

    Computation performed in f is always lazy, even when called on an eager (Now) instance.

    Definition Classes
    Eval
  13. def memoize: Eval[A]

    Ensure that the result of the computation (if any) will be memoized.

    Ensure that the result of the computation (if any) will be memoized.

    Practically, this means that when called on an Always[A] a Later[A] with an equivalent computation will be returned.

    Definition Classes
    AlwaysEval
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. def value: A

    Evaluate the computation and return an A value.

    Evaluate the computation and return an A value.

    For lazy instances (Later, Always), any necessary computation will be performed at this point. For eager instances (Now), a value will be immediately returned.

    Definition Classes
    AlwaysEval
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Leaf[A]

Inherited from Eval[A]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped