apply

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
798 B
Applies function `fn` to the argument list `args`.
1 contributor
Install apply as a package?
Copied
npm i @bit/justin-capalbo.ramda.apply
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
apply (
fn:Function,
args:Array
) : *

Applies function fn to the argument list args. This is useful for creating a fixed-arity function from a variadic function. fn should be a bound function if context is significant.

Example
const nums = [1, 2, 3, -99, 42, 6, 7];
     R.apply(Math.max, nums); //=> 42
Arguments
fn: Function

The function which will be called with args

args: Array

The arguments to call fn with

Returns
*

result The result, equivalent to `fn(...args)`

Help and resources