2014-05-02 21:37:11 +00:00
|
|
|
(ns koans.01-equalities
|
|
|
|
|
(:require [koan-engine.core :refer :all]))
|
2014-01-26 00:04:22 +00:00
|
|
|
|
2010-02-06 16:49:53 +00:00
|
|
|
(meditations
|
2013-02-26 02:46:19 +00:00
|
|
|
"We shall contemplate truth by testing reality, via equality"
|
2010-07-26 23:20:42 +00:00
|
|
|
(= __ true)
|
2010-02-19 22:14:03 +00:00
|
|
|
|
2013-02-26 02:46:19 +00:00
|
|
|
"To understand reality, we must compare our expectations against reality"
|
2010-07-26 23:20:42 +00:00
|
|
|
(= __ (+ 1 1))
|
2010-02-19 22:14:03 +00:00
|
|
|
|
2010-07-26 23:20:42 +00:00
|
|
|
"You can test equality of many things"
|
2013-03-04 22:45:55 +00:00
|
|
|
(= (+ 3 4) 7 (+ 2 __))
|
2010-10-29 15:18:09 +00:00
|
|
|
|
|
|
|
|
"Some things may appear different, but be the same"
|
2013-03-04 22:45:55 +00:00
|
|
|
(= __ (= 2 2/1))
|
2010-10-29 15:18:09 +00:00
|
|
|
|
|
|
|
|
"You cannot generally float to heavens of integers"
|
|
|
|
|
(= __ (= 2 2.0))
|
|
|
|
|
|
|
|
|
|
"But a looser equality is also possible"
|
2013-03-04 22:45:55 +00:00
|
|
|
(= __ (== 2.0 2))
|
2010-11-04 13:01:34 +00:00
|
|
|
|
2013-03-04 23:06:46 +00:00
|
|
|
"Something is not equal to nothing"
|
|
|
|
|
(= __ (not (= 1 nil)))
|
|
|
|
|
|
2013-03-04 23:30:00 +00:00
|
|
|
"Strings, and keywords, and symbols: oh my!"
|
2015-06-14 16:11:39 +00:00
|
|
|
(= __ (= "hello" :hello 'hello))
|
2013-03-04 23:30:00 +00:00
|
|
|
|
|
|
|
|
"Make a keyword with your keyboard"
|
2015-06-14 16:11:39 +00:00
|
|
|
(= :hello (keyword __))
|
2013-03-04 23:30:00 +00:00
|
|
|
|
|
|
|
|
"Symbolism is all around us"
|
2015-06-14 16:11:39 +00:00
|
|
|
(= 'hello (symbol __))
|
2013-03-04 23:30:00 +00:00
|
|
|
|
2016-03-25 21:53:55 +00:00
|
|
|
"What could be equivalent to nothing?"
|
2016-03-25 18:12:04 +00:00
|
|
|
(= __ nil)
|
|
|
|
|
|
2010-11-04 13:01:34 +00:00
|
|
|
"When things cannot be equal, they must be different"
|
2011-02-08 21:57:15 +00:00
|
|
|
(not= :fill-in-the-blank __))
|