2 ms·
Everyone using jQuery is benefitting from functional programming. Querying, traversing, and filtering are based on `each` and `map`. It turns what was formerly
by straws 13y ago
Everyone using jQuery is benefitting from functional programming. Querying, traversing, and filtering are based on `each` and `map`. It turns what was formerly looping and saving values as temporary/instance variables into declarative, collection-based compositions of functions.
Beyond that, Michael Fogus — big in the Clojure + Clojurescript community — has Functional Javascript which explores functional concepts using Underscore:
http://www.amazon.com/Functional-JavaScript-Introducing-Programming-Underscore-js/dp/1449360726/ http://www.amazon.com/Functional-JavaScript-Introducing-Prog...
Marijn Haverbeke — a big Lisp hacker and the creator of Codemirror — has a nice chapter in (the free!) Eloquent Javascript as well:
http://eloquentjavascript.net/chapter6.html http://eloquentjavascript.net/chapter6.html
You should also check out how Javascript supports functional programming in languages that compile to Javascript such as LiveScript or Elm.
http://livescript.net/ http://livescript.net/
http://elm-lang.org/ http://elm-lang.org/