Try using map instead - (fn [s] (reduce + (map (fn [_] 1) s)))
Or even better - (fn [s] (reduce (fn [x _] (inc x)) 0 s)) Regards, BG On Tue, Jan 10, 2012 at 11:33 PM, Erlis Vidal <er...@erlisvidal.com> wrote: > Hi, > > I'm solving the following exercise and when I'm trying to use the answer: > > #(reduce + (for [x coll] 1)) > > I get the error saying that I was using "count" which I'm not. Someone > knows why is that? Is this a bug in 4Clojure or something in the language > that I cannot see? > > Thanks > Erlis > > [image: impossible.png] > > -- > 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 -- Baishampayan Ghose b.ghose at gmail.com -- 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
<<impossible.png>>