Add cond; fix typo.
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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))))"]} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user