Allow nil as an answer.
This commit is contained in:
parent
1648d9e94a
commit
f29e547f2a
@ -24,6 +24,9 @@
|
||||
(= __ ({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))
|
||||
|
||||
"But you can provide your own default"
|
||||
(= __ (get {:a 1 :b 2} :c :key-not-found))
|
||||
|
||||
"You can find out if a key is present"
|
||||
|
@ -44,6 +44,7 @@
|
||||
1
|
||||
1
|
||||
"Vancouver"
|
||||
nil
|
||||
:key-not-found
|
||||
true
|
||||
false
|
||||
|
@ -3,8 +3,8 @@
|
||||
(:require [clojure.set]
|
||||
[clojure.string]))
|
||||
|
||||
(def __ nil)
|
||||
(def ___ (fn [& args] nil))
|
||||
(def __ :fill-in-the-blank)
|
||||
(def ___ (fn [& args] __))
|
||||
|
||||
(defmacro meditations [& forms]
|
||||
(let [pairs (partition 2 forms)]
|
||||
|
Loading…
Reference in New Issue
Block a user