the first parameter type
the second parameter type
the third parameter type
the fourth parameter type
the result type
Invoke the function
Returns a new composed function which first applies the current function and then the one you pass as parameter.
Applies this function partially to one argument.
const plus5 = Function4.of(
(x:number,y:number,z:number,a:number)=>x+y+z+a)
.apply1(5);
assert.equal(11, plus5(1,2,3));
Applies this function partially to two arguments.
const plus51 = Function4.of(
(x:number,y:number,z:number,a:number)=>x+y+z+a)
.apply2(5,1);
assert.equal(11, plus51(2,3));
Applies this function partially to three arguments.
const plus512 = Function4.of(
(x:number,y:number,z:number,a:number)=>x+y+z+a)
.apply3(5,1,2);
assert.equal(11, plus512(3));
Returns a curried version of this function, for example: See Function2.curried
Returns a version of this function taking its parameters in the reverse order.
Returns a version of this function which takes a tuple instead of individual parameters.
Generated using TypeDoc
Function4 encapsulates a function taking four parameters and returning a value. It adds some useful functions to combine or transform functions.