3 ms·
I find the name "reduce" unfortunate, especially since the classic example, (defn sum [xs] (reduce + xs 0)) (or whatever) only reinforces the naive assump
by gavinpc 12y ago
I find the name "reduce" unfortunate, especially since the classic example,
(defn sum [xs] (reduce + xs 0))
(or whatever) only reinforces the naive assumption that it makes the thing smaller. It was only after playing with dozens of problems on 4clojure (a great site), that I grokked how reduce can make the input much bigger, or anything you want.
So in that respect, I think "transduce" better fits the concept of transformation, which is what this is all about.