Make a call with lazy_dots as arguments.
make_call.RdIn order to exactly replay the original call, the environment must be the
same for all of the dots. This function circumvents that a little,
falling back to the baseenv() if all environments aren't
the same.
Arguments
- fun
Function as symbol or quoted call.
- args
Arguments to function; must be a
lazy_dotsobject, or somethingas.lazy_dots()can coerce..
Examples
make_call(quote(f), lazy_dots(x = 1, 2))
#> <lazy>
#> expr: f(x = 1, 2)
#> env: <environment: 0x60f6c7527bd0>
make_call(quote(f), list(x = 1, y = ~x))
#> <lazy>
#> expr: f(x = 1, y = x)
#> env: <environment: base>
make_call(quote(f), ~x)
#> <lazy>
#> expr: f(x)
#> env: <environment: 0x60f6c7527bd0>
# If no known or no common environment, fails back to baseenv()
make_call(quote(f), quote(x))
#> <lazy>
#> expr: f(x)
#> env: <environment: base>