std/core/delayed▲toc

Delayed computations.

.

type delayedstd/core/delayed/delayed: (E, V) -> V<e,a>

Delayed (or lazy) values are computed (with effect e) only the first time forcestd/core/delayed/force: forall<a,e> (delayed : delayed<e,a>) -> e a is called and cached afterwards.

Force a delayed value; the value is computed only on the first call to forcestd/core/delayed/force: forall<a,e> (delayed : delayed<e,a>) -> e a and cached afterwards.

fun once( calc : () -> a ) : (() -> a)

Given a total function to calculate a value a, return a total function that only calculates the value once and then returns the cached result.

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/unsafestd/core/unsafe