-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01_equalities.clj
More file actions
39 lines (27 loc) · 979 Bytes
/
Copy path01_equalities.clj
File metadata and controls
39 lines (27 loc) · 979 Bytes
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
(ns koans.01-equalities
(:require [koan-engine.core :refer :all]))
(meditations
"We shall contemplate truth by testing reality, via equality"
(= true true)
"To understand reality, we must compare our expectations against reality"
(= 2 (+ 1 1))
"You can test equality of many things"
(= (+ 3 4) 7 (+ 2 5))
"Some things may appear different, but be the same"
(= true (= 2 2/1))
"You cannot generally float to heavens of integers"
(= false (= 2 2.0))
"But a looser equality is also possible"
(= true (== 2.0 2))
"Something is not equal to nothing"
(= true (not (= 1 nil)))
"Strings, and keywords, and symbols: oh my!"
(= false (= "hello" :hello 'hello))
"Make a keyword with your keyboard"
(= :hello (keyword "hello"))
"Symbolism is all around us"
(= 'hello (symbol "hello"))
"What could be equivalent to nothing?"
(= nil nil)
"When things cannot be equal, they must be different"
(not= :fill-in-the-blank "something"))