fp::apply -- apply function to
arguments
Introductionfp::apply(f,a) returns
f(a).
Call(s)fp::apply(f <, e...>)
Parametersf |
- | function |
e |
- | object used as argument |
ReturnsThe result of the function call f(e,...).
Side
EffectsSame side effects as when calling f(e,...)
directly.
Detailsfp::apply applies the function f to the
arguments given by e....
Example
1Apply the function f to x and
y:
>> fp::apply(f, x, y)
f(x, y)
Example
2Apply the functions of the first list to the arguments given by the second list:
>> zip([sin, cos], [x, y], fp::apply)
[sin(x), cos(y)]