identical? checks if two things are the same instances in memory. = is a much nicer value oriented equality and idiomatic.
David On Wed, Nov 30, 2011 at 5:23 PM, Mamun <[email protected]> wrote: > Hi, > > When I run the following code, I got false for (identical? 128 128). > What is the different between = and identical? > > (println (= 4 4)) > true > (println (= 128 128)) > true > (println (identical? 4 4)) > true > (println (identical? 128 128)) > false > > > Regards, > Mamun > > -- > 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
