Avoid nil answer, but allow it to fail if it's wrong. Fixes #6.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
(meditations
|
||||
"Lists can be expressed by function or a quoted form"
|
||||
(= '(__) (list 1 2 3 4 5))
|
||||
(= '(__ __ __ __ __) (list 1 2 3 4 5))
|
||||
|
||||
"They are Clojure seqs (sequences), so they allow access to the first"
|
||||
(= __ (first '(1 2 3 4 5)))
|
||||
|
@@ -24,7 +24,7 @@
|
||||
(= __ ({2006 "Torino" 2010 "Vancouver" 2014 "Sochi"} 2010))
|
||||
|
||||
"You may not be able to find an entry for a key"
|
||||
(= __ (get {:a 1 :b 2} :c))
|
||||
(= __ (get {:a 1 :b 2} :c :key-not-found))
|
||||
|
||||
"You can find out if a key is present"
|
||||
(= __ (contains? {:a nil :b nil} :b))
|
||||
|
Reference in New Issue
Block a user