Comment by jdmichal
11 years ago
I'm more disappointed that it doesn't short-circuit the operation at all. It applies all the functions, THEN it determines whether all of them passed. Even worse, it uses `every` (which does short-circuit) to determine that all the functions are, indeed, functions, but apparently the ability to use that function to determine whether every predicate passes was missed.
It could have been a simple for loop with a break whenever one evaluates false. Blazing fast in every javascript engine, and easy to see all the code in one place.
Instead, it’s a slow tower of bloat, which you need to read 5 files to reason about.
Javascript implementation:
Or Coffeescript (including the function check):