Add another simple destructuring example.
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
(meditations
|
||||
"Destructuring allows you to break up arguments"
|
||||
"Destructuring is an arbiter: it breaks up arguments"
|
||||
(= __ ((fn [[a b]] (str b a))
|
||||
[:foo :bar])))
|
||||
[:foo :bar]))
|
||||
|
||||
"Whether in function definitions"
|
||||
(= "First comes love, then comes marriage, then comes Clojure with the baby carriage"
|
||||
((fn [[a b c]] __)
|
||||
["love" "marriage" "Clojure"]))
|
||||
|
||||
)
|
||||
|
Reference in New Issue
Block a user