Share your code. Components are building blocks, you are the architect.

utils/partial
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
Build: fail
BuildFail
Build Status: fail
Takes a function `f` and a list of arguments, and returns a function `g`

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/partial in your project
npm i @bit/bit.ramda.utils.partial
Copied

partial (f:Function, args:Array) : Function

Takes a function f and a list of arguments, and returns a function g. When applied, g returns the result of applying f to the arguments provided initially followed by the arguments provided to g.

Example

var multiply2 = (a, b) => a * b;
     var double = R.partial(multiply2, [2]);
     double(2); //=> 4

     var greet = (salutation, title, firstName, lastName) =>
       salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';

     var sayHello = R.partial(greet, ['Hello']);
     var sayHelloToMs = R.partial(sayHello, ['Ms.']);
     sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!'

Arguments

f: Function

args: Array

Returns

Function