On Tue, Feb 17, 2009 at 9:08 PM, Christophe Grand <christo...@cgrand.net> wrote:
>
> Fixing array-map would make the two tests consistent but I'm not sure
> that (let [a (atom 0)] {(swap! a inc) 1 (swap! a inc) 2 }) should
> evaluate to {1 2}.

That would make it two distinct issues, as I see it. One for
array-map, and one for whether association happens before or after the
keys have been evaluated.

It would seem really strange to me if the following behavior is correct:

user=> (def m (array-map 1 1 1 2 1 3))
#'user/m
user=> (m 1)
1
user=> (m 2)
nil
user=> m
{1 1, 1 2, 1 3}

So I went ahead and opened an issue for that:
http://code.google.com/p/clojure/issues/detail?id=83

I agree it would be nice if the keys were evaluated before the map was
created - python certainly does it that way, though it isn't a lisp.
Clojure is the only lisp I'm familiar with, so I can't say what's
normal here.

>
> Christophe
>
> --
> Professional: http://cgrand.net/ (fr)
> On Clojure: http://clj-me.blogspot.com/ (en)
>
>
>
> >
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.

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