the first parameter type
the second parameter type
the third parameter type
the fourth parameter type
the fifth 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 = Function5.of(
(x:number,y:number,z:number,a:number,b:number)=>x+y+z+a+b)
.apply1(5);
assert.equal(15, plus5(1,2,3,4));
Applies this function partially to two arguments.
const plus51 = Function5.of(
(x:number,y:number,z:number,a:number,b:number)=>x+y+z+a+b)
.apply2(5,1);
assert.equal(15, plus51(2,3,4));
Applies this function partially to three arguments.
const plus512 = Function5.of(
(x:number,y:number,z:number,a:number,b:number)=>x+y+z+a+b)
.apply3(5,1,2);
assert.equal(15, plus512(3,4));
Applies this function partially to four arguments.
const plus5123 = Function5.of(
(x:number,y:number,z:number,a:number,b:number)=>x+y+z+a+b)
.apply4(5,1,2,3);
assert.equal(15, plus5123(4));
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
Function5 encapsulates a function taking give parameters and returning a value. It adds some useful functions to combine or transform functions.