Similar threads are https://groups.google.com/forum/?hl=en#!topic/clojure/A1gW_BB_4MU
https://groups.google.com/forum/?hl=en#!topic/clojure-dev/scvyi2Cwk7g Luca Il giorno martedì 14 gennaio 2014 16:43:10 UTC+1, Yves Parès ha scritto: > > Hello! > When mapping and reducing a map, it seems arguments are passed differently > to the function that is mapped depending on whether you reduce with > r/reduce or r/fold: > > (r/fold + > (r/map (fn [k v] (inc v)) {:a 4 :b 5})) > But: > (r/reduce + > (r/map (fn [[k v]] (inc v)) {:a 4 :b 5})) > > The function r/mapped is the same each time, but if the return value of > r/map is further reduce with r/fold, it received 2 arguments (key and > value). However, if it is reduced with r/reduce, the fn is called with ONE > pair [k v]. > > Is that normal? > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.