This destructuring on sequences works:
user=> (let [[:as m] [1 2]] m)
[1 2]
but this one on associations doesn't (and it seems like it should):
user=> (let [{:as m} {:b 1 :c 2}] m)
java.lang.NullPointerException
clojure.lang.Compiler$CompilerException: NO_SOURCE_FILE:14: null
......
Is there a principled reason for this that I'm overlooking?
Note that a slight modification does work as I would expect:
user=> (let [{d :b :as m} {:b 1 :c 2}] m)
{:b 1, :c 2}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---