Re: inconsistent behavior with destructuring ...

2012-04-18 Thread Meikel Brandmeyer (kotarak)
Hi, yes, I think so. The destructuring should not depend on the presence or absence of a (for a given key) unrelated option. So no matter what I do with :as the :a, :b, etc. keys should be correctly destructured, even in nested maps as in your example. Kind regards Meikel -- You received thi

Re: inconsistent behavior with destructuring ...

2012-04-18 Thread Sunil S Nandihalli
You think I should file a bug-report? Sunil. On Thu, Apr 19, 2012 at 11:53 AM, Meikel Brandmeyer (kotarak) 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/se

Re: inconsistent behavior with destructuring ...

2012-04-18 Thread Meikel Brandmeyer (kotarak)
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

Re: inconsistent behavior with destructuring ...

2012-04-18 Thread Sunil S Nandihalli
the behaviour seems to be the same in 1.4.0 Sunil. On Thu, Apr 19, 2012 at 11:31 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hi Everybody, > I was just wondering if the following behaviour is the right behaviour.. > can somebody comment? > > user>> (let [{{a :a b :b :as w} :c

inconsistent behavior with destructuring ...

2012-04-18 Thread Sunil S Nandihalli
Hi Everybody, I was just wondering if the following behaviour is the right behaviour.. can somebody comment? user>> (let [{{a :a b :b :as w} :c a1 :a b1 :b :as w} {:a 10 :b 20 :c {:a 30 :b 40}}] {:a a :b b :b1 b1 :a1 a1}) {:a 30, :b 40, :b1 40, :a1 30} user>> (let [{{a :a b :b :as w} :c a1 :a b