Re: Help with Reduce

2013-12-09 Thread David Simmons
Hi Guru Ah my mistake, silly typo in my version. cheers Dave -- -- 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 y

Re: Help with Reduce

2013-12-09 Thread David Simmons
Hi Guru odd. I'll give it another go. Kind Regards DAve -- -- 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

Re: Help with Reduce

2013-12-09 Thread Guru Devanla
Hi Dave, I tried running your code. I did see a function being returned in both cases. Am I doing something different? Thanks Guru On Mon, Dec 9, 2013 at 12:09 PM, David Simmons wrote: > Hi > > I have the following function: > > (defn group > [& validators] > (fn [m] > (reduce (fn [map

Help with Reduce

2013-12-09 Thread David Simmons
Hi I have the following function: (defn group [& validators] (fn [m] (reduce (fn [maps f] (let [[m error-m] maps [new-map errors] (f m)] [new-map (vec (flatten (if errors (conj error-m errors) error-m)))])) [m []]