lazy evaluation
Arguments evaluated when needed, argument results are memoized.
We can use the following primitives:
type a susp
val delay: (unit -> a) -> a susp
val force: a susp -> a
These primitives can encode all lazy algorithms.
fun force($x) = x
Examples
Simple explicitly lazy functions