Module
Data.Lazy
- Package
- lazy
- Repository
- purerl/purescript-lazy
#Lazy Source
data Lazy :: Type -> TypeLazy a represents lazily-computed values of type a.
A lazy value is computed at most once - the result is saved after the first computation, and subsequent attempts to read the value simply return the saved value.
Lazy values can be created with defer, or by using the provided
type class instances.
Lazy values can be evaluated by using the force function.
purerl note: Due to the nature of the BEAM platform Lazy values are not in fact lazy with the Erlang backend, but simple thunks, i.e. will be recomputed each time they are required.
Instances
(Semiring a) => Semiring (Lazy a)(Ring a) => Ring (Lazy a)(CommutativeRing a) => CommutativeRing (Lazy a)(EuclideanRing a) => EuclideanRing (Lazy a)(Eq a) => Eq (Lazy a)Eq1 Lazy(Ord a) => Ord (Lazy a)Ord1 Lazy(Bounded a) => Bounded (Lazy a)(Semigroup a) => Semigroup (Lazy a)(Monoid a) => Monoid (Lazy a)(HeytingAlgebra a) => HeytingAlgebra (Lazy a)(BooleanAlgebra a) => BooleanAlgebra (Lazy a)Functor LazyFunctorWithIndex Unit LazyFoldable LazyFoldableWithIndex Unit LazyFoldable1 LazyTraversable LazyTraversableWithIndex Unit LazyTraversable1 LazyInvariant LazyApply LazyApplicative LazyBind LazyMonad LazyExtend LazyComonad Lazy(Show a) => Show (Lazy a)Lazy (Lazy a)
- Modules
- Data.
Lazy