lift

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

“lifts” a function of arity > 1 so that it may “map over” a list, Function or other object that satisfies the FantasyLand Apply spec.

Example
const madd3 = R.lift((a, b, c) => a + b + c);

     madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]

     const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);

     madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24]
Argument
fn: Function

The function to lift into higher context

Returns
Function

The lifted function.

Help and resources