Show not= and collection equality.

master
Colin Jones 14 years ago
parent fa90fc7e86
commit 47d4342314

@ -15,4 +15,7 @@
(= __ (= 2 2.0)) (= __ (= 2 2.0))
"But a looser equality is also possible" "But a looser equality is also possible"
(== 2.0 2 __)) (== 2.0 2 __)
"When things cannot be equal, they must be different"
(not= nil __))

@ -27,4 +27,7 @@
(= __ (nth [:peanut :butter :and :jelly] 3)) (= __ (nth [:peanut :butter :and :jelly] 3))
"You can also slice a vector" "You can also slice a vector"
(= __ (subvec [:peanut :butter :and :jelly] 1 3))) (= __ (subvec [:peanut :butter :and :jelly] 1 3))
"Equality with collections is in terms of values"
(___ (list 1 2 3) (vector 1 2 3)))

@ -10,7 +10,8 @@
5 5
4/2 4/2
false false
6/3]} 6/3
3]}
"lists" {"__" ["1 2 3 4 5" "lists" {"__" ["1 2 3 4 5"
1 1
[2 3 4 5] [2 3 4 5]
@ -30,7 +31,8 @@
:peanut :peanut
:jelly :jelly
:jelly :jelly
[:butter :and]]} [:butter :and]]
"___" ["="]}
"sets" {"__" [3 "sets" {"__" [3
#{1 2 3 4 5} #{1 2 3 4 5}
#{1 2 3 4 5} #{1 2 3 4 5}

Loading…
Cancel
Save