vadr (version 0.01)

quote_args: Quote all arguments, like alist. But when bare words are given as arguments, interpret them as the argument name, rather than the argument value. Return a pairlist. This emulates the syntax used to specify function arguments and defaults.

Description

Quote all arguments, like alist. But when bare words are given as arguments, interpret them as the argument name, rather than the argument value. Return a pairlist. This emulates the syntax used to specify function arguments and defaults.

Usage

quote_args(...)

Arguments

...
the arguments to quote.

Value

a pairlist, with quoted arguments, and barewords inprepreted as names

Examples

Run this code
substitute(`function`(args, body), list(args=quote_args(x, y=1), body=quote(x+y)))

Run the code above in your browser using DataCamp Workspace