Thanks! :)

2011/1/24 Nick Zbinden <nick...@gmail.com>

> 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 <ltoro...@gmail.com> 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 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<clojure%2bunsubscr...@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 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

Reply via email to