You think I should file a bug-report?
Sunil.
On Thu, Apr 19, 2012 at 11:53 AM, Meikel Brandmeyer (kotarak)
<[email protected]>wrote:
> Hi,
>
> I think this is a bug. This is the expansion without any :as clause:
>
> (let*
> [map__4496
> {:a 10, :b 20, :c {:a 30, :b 40}}
> map__4496
> (if (clojure.core/seq? map__4496)
> (clojure.core/apply clojure.core/hash-map map__4496)
> map__4496)
> map__4497
> (clojure.core/get map__4496 :c)
> map__4497
> (if (clojure.core/seq? map__4497)
> (clojure.core/apply clojure.core/hash-map map__4497)
> map__4497)
> a
> (clojure.core/get map__4497 :a)
> b
> (clojure.core/get map__4497 :b)
> a1
> (clojure.core/get map__4496 :a)
> b1
> (clojure.core/get map__4496 :b)]
> {:a a, :b b, :b1 b1, :a1 a1})
>
> Now with the :as clauses:
>
> (let*
> [w
> {:a 10, :b 20, :c {:a 30, :b 40}}
> w
> (if (clojure.core/seq? w)
> (clojure.core/apply clojure.core/hash-map w)
> w)
> w
> (clojure.core/get w :c)
> w
> (if (clojure.core/seq? w)
> (clojure.core/apply clojure.core/hash-map w)
> w)
> a
> (clojure.core/get w :a)
> b
> (clojure.core/get w :b)
> a1
> (clojure.core/get w :a)
> b1
> (clojure.core/get w :b)]
> {:a a, :b b, :b1 b1, :a1 a1})
>
> As you can see :as simply replace the generated symbol with the given one.
> This is a mistake however. I think the correct expansion should look
> something like this:
>
> (let*
> [map__4502
> {:a 10, :b 20, :c {:a 30, :b 40}}
> map__4502
> (if (clojure.core/seq? map__4502)
> (clojure.core/apply clojure.core/hash-map map__4502)
> map__4502)
> w map__4502
> map__4503
> (clojure.core/get map__4502 :c)
> map__4503
> (if (clojure.core/seq? map__4503)
> (clojure.core/apply clojure.core/hash-map map__4503)
> map__4503)
> w map__4503
> a
> (clojure.core/get map__4503 :a)
> b
> (clojure.core/get map__4503 :b)
> a1
> (clojure.core/get map__4502 :a)
> b1
> (clojure.core/get map__4502 :b)]
> {:a a, :b b, :b1 b1, :a1 a1})
>
> Kind regards
> Meikel
>
> --
> 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