(rontolisp) docs
← Numbers and predicates

=

(= x...)

Compares the neighbours of the chain: true when every adjacent pair is equal, one argument alone always true. Maps compare entry-wise, sets member-wise, and sequentials (vectors, lists, lazy seqs) element-wise across kinds, all deeply and structurally; a string is no sequential, and nil equals an empty sequential (it is the empty list here, where the oracle answers false for (= [] nil)). The comparison is equal-shaped, not truthiness: (= false nil) is false, the two objects being distinct. A Java object on the left is asked its own equals, as in the oracle, so (= o 1) hands it the number while (= 1 o) is false; false, a keyword, a symbol or a collection is never handed to equals (the oracle hands it). A Java List, Map or Set is = to a Clojure sequential, map or set of = elements, either side first, as in the oracle. Works as a function value of the same arity.