Skip to content

equality

TurtleKitty edited this page May 12, 2019 · 2 revisions

is?

Compares two objects by identity.

=

Compares two objects by content.

!=

Shorthand for (not (= ...)).

(is? 2 2)               ; true
(is? 'foo 'foo)         ; true
(is? "foo" "foo")       ; false
(is? '(1 2 3) '(1 2 3)) ; false
(is? () ())             ; true

(= 2 2)                 ; true
(= 'foo 'foo)           ; true
(= "foo" "foo")         ; true
(= '(1 2 3) '(1 2 3))   ; true
(= () ())               ; true

(!= 2 3)                ; true
(!= 2 2)                ; false
Clone this wiki locally