Constructor for F[A]
that's going to evaluate the
given by-name value in the F
context, with whatever
properties this data-type may have (e.g.
Constructor for F[A]
that's going to evaluate the
given by-name value in the F
context, with whatever
properties this data-type may have (e.g. lazy, async,
exceptions catching, etc).
For pure expressions, in case F[_]
also implements the
Applicative
type-class, then this operation should yield
a value that's equivalent with pure(f)
.
In case this is an applicative, should be isomorphic to:
F.pure(()).map(_ => F.pure(f))
In case F[_]
implements ApplicativeError[Throwable, F]
,
then eval(throw ex)
should be equivalent with raiseError(ex)
.
A type-class for
F[_]
data types that have a data constructor taking a by-name value and that is equivalent toApplicative.pure
for pure expressions.