On Jun 3, 2012, at 8:53 PM, Steven Obua wrote:
> The expression
>
> (#({:a %}) :b)
>
> 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.
#(f ...) expands to (fn [...] (f ...)), so #({:a %}) would be (fn [x] ({:a x})).
In order for #({:a %}) to work as you want, the more common usage #(f %) would
have to become #((f %)). That seems like a poor trade-off to me.
--
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