Re:Why functional programming matters (aka MapReduce for hum...
by SeoxyS on Saturday March 10, 2012 @05:30PM
(#3688897)
I hardly see this as an example of what's great about map/reduce or functional programming… It doesn't illustrate either the core concept of map/reduce, or that of functional programming.
I think this is a better basic example (in clojure) of what makes functional programming and map/reduce powerful (skipping Hadoop, while we're at it):
Simple word count function, completely functional, and using the map/reduce concept.
This function allows you to infinitely parallelize word counts: you could simply run `wc-map` on a file and `wc-reduce`, maybe even on multiple servers, merge (merge-with concat) the results, and run it through `wc-reduce` again, ad infinitum.
I think this is a better basic example (in clojure) of what makes functional programming and map/reduce powerful (skipping Hadoop, while we're at it):
Simple word count function, completely functional, and using the map/reduce concept.This function allows you to infinitely parallelize word counts: you could simply run `wc-map` on a file and `wc-reduce`, maybe even on multiple servers, merge (merge-with concat) the results, and run it through `wc-reduce` again, ad infinitum.