Module

Data.Lazy

#Lazy

data Lazy t0

Lazy 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.

Instances

#defer

defer :: forall a. (Unit -> a) -> Lazy a

Defer a computation, creating a Lazy value.

#force

force :: forall a. Lazy a -> a

Force evaluation of a Lazy value.

Modules