clojure.core/==¶
Returns non-nil if nums all have the equivalent value (type-independent), otherwise false
Examples¶
Note by gstamp¶
There is a difference between "=" and "". For primitives you definitely want to use "" as "=" will result in a cast to the wrapped types for it's arguments.
This may not be the case come Clojure 1.3 (see [1])
[1] http://github.com/clojure/clojure/commit/df8c65a286e90e93972bb69392bc106128427dde
Note by popopome¶
So what is difference with =?
Note by mattharden¶
'== is defined only for numbers, where '= is general equality. The example showing (== :foo) as true is a bit misleading because (== :foo :foo) produces an exception. Unary == always returns true as an optimization.
See also¶
Content from the matching ClojureDocs page, with authors credited on each contribution.