lift-n

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
6
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
3 KB
"lifts" a function to be the specified arity, so that it may "map over" that
1 contributor
Install lift-n as a package?
Copied
npm i @bit/justin-capalbo.ramda.lift-n
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
liftN (
fn:Function
) : Function

“lifts” a function to be the specified arity, so that it may “map over” that many lists, Functions or other objects that satisfy the FantasyLand Apply spec.

Example
const madd3 = R.liftN(3, (...args) => R.sum(args));
     madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
Argument
fn: Function

The function to lift into higher context

Returns
Function

The lifted function.

Help and resources