I can't find the documentation for this behaviour:

(let [{x :b :as y} '(:a 1 :b 2)] [x y])

;=> [2 {:a 1, :b 2}]

It seems as if the list in the init-expr is converted first to an
associative structure and then destructured.
But that behaviour doesn't seems to be documented, the map destructuring
documentation only talks
about destructuring of associative structures, and also there is nothing
about binding the :as expression
to the resultant associative structure instead of the initial init-expr.

Is this documented somewhere? Is an intended behaviour assured to be
present in the future Clojure
versions?

Saludos,
Nahuel Greco.

-- 
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