-
Notifications
You must be signed in to change notification settings - Fork 0
/
Equality
40 lines (21 loc) · 770 Bytes
/
Equality
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ClojureScript Koans Equality Answers
http://clojurescriptkoans.com/#equality/1
1) We shall contemplate truth by testing reality, via equality
(= true true)
2) To understand reality, we must compare our expectations against reality
(= 2 (+ 1 1))
3) You can test equality of many things
(= (+ 3 4) 7 (+ 2 2 3 ))
4) But you may not string yourself along
(= false (= 2 "2"))
5) Something is not equal to nothing
(= true (not (= 1 nil)))
6) Strings, and keywords, and symbols: oh my!
(= false (= "foo" :foo 'foo))
7) Make a keyword with your keyboard
(= :foo (keyword "foo" ))
8) Symbolism is all around us
(= 'foo (symbol "foo" ))
9) When things cannot be equal, they must be different
(not= :fill-in-the-blank
:they-are-different )