Skip to content

equality

Turtle Kitty edited this page Aug 9, 2015 · 1 revision

is?

Compares two objects by identity.

=

Compares two objects by content.

!=

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

(is? 2 2) -> true
(is? 'x 'x) -> true
(is? $x $x) -> true
(is? "foo" "foo") -> false
(is? '(1 2 3) '(1 2 3)) -> false
(is? () ()) -> true

(= 2 2) -> true
(= 'x 'x) -> true
(= "foo" "foo") -> true
(= '(1 2 3) '(1 2 3)) -> true
(= () ()) -> true

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