Short start on destructuring.

This commit is contained in:
Colin Jones 2010-11-06 17:38:31 -05:00
parent b340cb6ccb
commit cf4162ece6
4 changed files with 7 additions and 2 deletions

View File

@ -4,7 +4,6 @@ immutability/side effects
state identity lifetime
memoization
lazy sequences
recursion
recursive list processing
trampolining
reflection

View File

@ -0,0 +1,4 @@
(meditations
"Destructuring allows you to break up arguments"
(= __ ((fn [[a b]] (str b a))
[:foo :bar])))

View File

@ -94,6 +94,7 @@
(if (zero? n)
acc
(recur (dec n) (* acc n))))]}
"destructuring" {"__" ["\":bar:foo\""]}
})
(defn replace-with [s k replacements]

View File

@ -26,7 +26,8 @@
"runtime_polymorphism"
"sequence_comprehensions"
"partial_functions"
"recursion"])
"recursion"
"destructuring"])
(defn run []
(apply load (doall (map (partial str "koans/") ordered-koans)))