Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Returns the new composite function.
const add = (x: number, y: number) => x + y;
const square = (n: number) => n * n;
const double = (n: number) => n * 2;
const toStr = (n: number) => n.toString();
const split = (s: string) => s.split('');
const combined = flowRight(split, toStr, double, square, add);
console.log(combined(1, 2)); // ['1', '8']
Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.
The this
context of the returned function is also passed to the functions provided as parameters.
This method is like flow
except that it creates a function that invokes the given functions from right to left.
Rest
...funcs: ((...args: any[]) => any)[]The functions to invoke.
Returns the new composite function.
Rest
...args: any[]
Alias