Thanks! :) 2011/1/24 Nick Zbinden <[email protected]>
> That a problem people find often. > > The thing is #(%) not the same as (fn [x] x) its more like (fn [x] > (x)). > > So if you write #([x]) is (fn [x] ([x])) witch throws an error. You > would have to write #(vec %). > > On Jan 24, 1:59 pm, László Török <[email protected]> wrote: > > Hi, > > > > just a quick one: > > > > (mapcat #([% 1]) [1 3 5]) > > > > gives an exception (wrong argument) > > > > (mapcat (fn [a] [a 1]) [1 3 5]) > > > > works though... > > > > What did I get wrong? > > > > Thx > > > > Las > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected]<clojure%[email protected]> > 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 post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
