Functional Math With Closures

2015 Jun23
E

ven though javascript is the most widely used programming language in the world, people still bash it. *Closures are confusing and prone to errors*, people will often say. Which is a true statement. However, higher order functions and closures are one of the things javascript does best. It allows us bend the language to do some pretty interesting things.

In one situation, I pointed out one could create a function based math library and just dynamically create equations on the fly rather than having to hard code math logic all over the place, where all numbers and operations are functions that accept functions as arguments. Of course I was challenged on the fact - So, of course I had

Read More