3 ms·
A lot of that has to do with Javascript's environment. While it is a functional language, it's living in a decidedly procedural world. The DOM is defined in I
by ajross 18y ago
A lot of that has to do with Javascript's environment. While it is a functional language, it's living in a decidedly procedural world. The DOM is defined in IDL, for goodness sake, and even the really cool libraries like jQuery don't make much use of the functional paradigm. So there's not a lot of clever code to study that doesn't look like C, basically.
Nonetheless, there are all sorts of clever things you can do with closures in Javascript to avoid big declarations of global variables, etc... You just have to dig really hard to find the sample code that appears in the tutorials for lisp, haskell, ML, etc...