Skip to content

apply

Summary

Applies f to xs.

Description

Takes a function f then a list of arguments xs. Applies f to the arguments and returns the result.

Examples

Adds the numbers in each tuple.

1
2
map(apply(add))([[1,2],[3,4],[5,6]]);
//=> [3,7,11]

Parameters

Name Type Description
f function
xs Array

Return

?