forceAndCall
Call a function with Some Arguments Forced
Description
Evaluates a specified number of '...' arguments, and then calls a function
with the '...' arguments.
Usage
forceAndCall(n, FUN, ...)
Arguments
n |
an integer specifying the number of '...' arguments to evaluate
before passing all of the arguments to FUN.
|
FUN |
a function to call with the '...' arguments.
|
... |
the arguments to pass to FUN.
|
Details
This function is similar to calling FUN(...), except that the first
n of the '...' arguments are evaluated before the function is
called.
Value
returns the value returned by FUN.
See Also
Examples
forceAndCall(1, function(x,y,z) {cat('<fn>');c(x,y)},
y={cat('<y>');1}, x={cat('<x>');2}, z={cat('<z>');66})
## prints <y><fn><x>[1] 2 1