My new blog here at www.mostovenko.com

Sunday, June 23, 2013

reduce in javascript

Despite the simplicity of javascripts nature, this language has nice instruments, that allows us to use the power and expressiveness of some features that came from functional languages. Map, filter, reduce are widely used in functional languages (clojure, haskell, lisp e.t.c).  In this article i will show you some interesting cases of using reduce method.  All examples will be written in both - javascript and coffeescript, to demonstrate how coffeescript improves code expressiveness and readability.