assign-delayed: Create an delayed binding.

Description Usage Arguments Examples

Description

Infix form of delayedAssign which creates an delayed or lazy binding, which only evaluates the expression the first time it is used.

Usage

1
x %<d-% value

Arguments

x

unquoted expression naming variable to create

value

unquoted expression to evaluate the first time name is accessed

Examples

1
2
3
4
x %<d-% (a + b)
a <- 10
b <- 100
x

Example output

[1] 110

pryr documentation built on Feb. 18, 2018, 9:02 a.m.