zap() creates a sentinel object that indicates that an object
should be removed. For instance, named zaps instruct env_bind()
and call_modify() to remove those objects from the environment or
the call.
The advantage of zap objects is that they unambiguously signal the
intent of removing an object. Sentinels like NULL or
missing_arg() are ambiguous because they represent valid R
objects.
zap() is_zap(x)
| x | An object to test. |
|---|
# Create one zap object: zap()#> <zap>#> [[1]] #> <zap> #> #> [[2]] #> <zap> #> #> [[3]] #> <zap> #>#> $foo #> <zap> #> #> $bar #> <zap> #>