lazy: creates a lazy value

Description Usage Arguments Details Value

Description

creates a lazy value

Usage

1
lazy(v = stop("v not supplied"))

Arguments

v

the value that should be computed only when required

Details

The value is computed only once and reused upon succesive calls.

Value

a constant function (i.e. a function with no arguments). The first time this function is called the computation v is performed and its value stored in memory to be recalled upon succesive calls.


argent0/functional documentation built on May 10, 2019, 1:26 p.m.