On 02/07/2012 09:37 PM, Aaron Cohen wrote:
Well, destructuring requires a literal, so you have to know exactly
the structure you're wanting to pick apart. For your specific example,
I can write a destructuring usage that will work, but there's no way
to do it in a general way.
user=>(defn do-sum [[{a1 :a} {a2 :a} {a3 :a}]]
(+ a1 a2 a3))
#'user/do-sum
user=>(do-sum something)
6
As I suspected. I'd say it makes sense.
Thank you for your reply Aaron!
--
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