See more
In other words, you can use higher order functions to make a function polymorphic. As you can see, higher order functions can be a whole lot more reusable and versatile than their f…
reduce((acc, curr) => acc + curr, 0, [1,2,3]); // 6
Purity: In some FP languages, purity is enforced by the language. Expressions with side-effects are not allowed.