You must deref (https://clojuredocs.org/clojure.core/deref) reference values to get the data inside of it.
(= @a 0) is the same as saying (= (deref a) 0) Hope this helps! On Thursday, February 12, 2015 at 2:27:39 PM UTC-5, Newbie wrote: > > I am trying to compare atom values with numbers. For e.g. - > > (def a (atom 0)) > (print a) gives --> #<Atom@2bcca11e: 0> > (= a 0) gives --> false > > How do I make this work? How do I compare 0 with the atom value? I want to > do the same for a string to? > I cannot use compare-and-set! for my situation. > > Thanks! > -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.