Hi,

2009/4/12 Allen Rohner <aroh...@gmail.com>

>
>
>
> >
> > > user=> (= {:a 5 :b (delay 12)} {:a 5 :b 12})
> > > false
> > > user=> (= {:a 5 :b (tdelay 12)} {:a 5 :b 12})
> > > true
> >
>
> > You shouldn't ignore your nervousness in this case:
> >
> > user=> (= {:a 5 :b 12} {:a 5 :b (tdelay 12)})
> > false
> >
>
>
> Out of curiosity, why are those different?



I guess that in the second case outlined by Rich, equals() is not called on
the tdelay instance, but on the Integer(12) instance. In pseudo code :

new tdelay(12).equals(new Integer(12)) != new Integer(12).equals(new
tdelay(12))

-- 
Laurent

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