1
0

Add cond; fix typo.

Dieser Commit ist enthalten in:
Colin Jones
2010-11-03 20:38:20 -05:00
Ursprung abcd170b34
Commit fa90fc7e86
2 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@@ -17,6 +17,12 @@
:doom
__))
"You may have a multitude of possible paths"
(let [x 5]
(= :your_road (cond (= x __) :road_not_taken
(= x __) :another_road_not_taken
:else __)))
"Or your fate may be sealed"
(= __ (if-not (zero? __)
'doom

Datei anzeigen

@@ -60,6 +60,7 @@
[]
0
:glory
4 6 :your_road
"'doom" 0 ]}
"higher_order_functions" {"__" [4 8 12
"(* x x)"
@@ -87,7 +88,7 @@
:a :b :c :d
:c :d]
"___" ["multiply-by-5"]}
"factorial" {"__" ["(loop [n n acc 1]
"recursion" {"__" ["(loop [n n acc 1]
(if (zero? n)
acc
(recur (dec n) (* acc n))))"]}