isBound: Check whether a function is bound to its enclosure

Description Usage Arguments Details Value See Also Examples

Description

isBound scans its input function's frame checking if there are any names not bound within its own scope - free variables. It returns a logical value indicating whether the input function is bound, aka a closure.

Usage

1
isBound(func)

Arguments

func

Function to check required.

Details

isBound(func) translates to: Is func bound to any names in its enclosing environment? isBound always returns FALSE for primitives since these do not have an environment.

Value

Logical indicating whether func is bound, a closure.

See Also

bind

Examples

1
2
3
isBound(sum)
one_plus <- bind(sum, 1L)
isBound(one_plus)

chiefBiiko/bounds documentation built on May 13, 2019, 4:09 p.m.