converge
Accepts a converging function and a list of branching functions and returns a function that applies each branching function to the arguments and the results of the branching functions are passed as arguments to the converging function.
- Use
Array.prototype.map()
andFunction.prototype.apply()
to apply each function to the given arguments. - Use the spread operator (
...
) to callconverger
with the results of all other functions.