On Aug 25, 2013, at 5:42 PM, ngieschen wrote: > > mapcat's signature is (f & colls) which indicates to me I should be able to > so something like (mapcat #(list (inc %)) [1 2 3] [4 5 6]). That is, doesn't > the & indicate that I can pass in a variable number of colls? However, if I > do, it crashes and burns, since internally it's calling (apply map #(list > (inc %)) '([1 2 3] '[4 5 6])), which, as expected, throws an ArityException. > > So, am I missing something or is mapcat's signature wrong? It seems to me it > should be (f colls) and not (f & colls).
mapcat is happy with a variable number of args, but the function that you're mapping down those multiple args doesn't have the right arity. Try: (mapcat #(list (inc %1) (inc %2)) [1 2 3] [4 5 6]) -Lee -- -- 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.