On Jun 3, 2012, at 8:53 PM, Steven Obua wrote:
> The expression
>
> (#({:a %}) :b)
either:
(#(hash-map :a %) :b)
((fn [x] {:a x}) :b)
will work instead.
Someone with more knowledge than me can probably explain better, but my
understanding is that the the reader macro shorthand for anonymous functions
and the map literal syntax can't both be used together (i.e. it's not a bug,
but a reader limitation).
bill
>
> should evaluate to {:a :b}, but raises an exception instead:
>
> Wrong number of args (0) passed to: PersistentArrayMap
>
> This is a pretty irritating bug and makes the #% form essentially unusable
> for me, because I cannot rely on it but have to always second guess if its
> use is safe in the current context or not.
>
> --
> 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
--
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