(= x)
(= x y)
(= x y & more)
Equality. Returns true if x equals y, false if not. Compares
numbers and collections in a type-independent manner. Clojure's immutable data
structures define -equiv (and thus =) as a value, not an identity,
comparison.
Source
(defn
=
"Equality. Returns true if x equals y, false if not. Compares\n numbers and collections in a type-independent manner. Clojure's immutable data\n structures define -equiv (and thus =) as a value, not an identity,\n comparison."
([x] true)
([x y] (if (nil? x) (nil? y) (or (identical? x y) (-equiv x y))))
([x y & more]
(if
(= x y)
(if
(next more)
(recur y (first more) (next more))
(= y (first more)))
false)))