From 91e67ebb2b4d1add01d2650359e26bbc1889b25b Mon Sep 17 00:00:00 2001 From: Kenneth Kostresevic Date: Wed, 15 Dec 2021 14:28:55 +0100 Subject: [PATCH] Solve conditionals --- src/koans/08_conditionals.clj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/koans/08_conditionals.clj b/src/koans/08_conditionals.clj index 87b9fdf..77af77b 100644 --- a/src/koans/08_conditionals.clj +++ b/src/koans/08_conditionals.clj @@ -10,38 +10,38 @@ (meditations "You will face many decisions" - (= __ (if (false? (= 4 5)) + (= :a (if (false? (= 4 5)) :a :b)) "Some of them leave you no alternative" - (= __ (if (> 4 3) + (= [] (if (> 4 3) [])) "And in such a situation you may have nothing" - (= __ (if (nil? 0) + (= nil (if (nil? 0) [:a :b :c])) "In others your alternative may be interesting" (= :glory (if (not (empty? ())) :doom - __)) + :glory)) "You may have a multitude of possible paths" (let [x 5] - (= :your-road (cond (= x __) :road-not-taken - (= x __) :another-road-not-taken - :else __))) + (= :your-road (cond (= x 3) :road-not-taken + (= x 4) :another-road-not-taken + :else :your-road))) "Or your fate may be sealed" - (= 'doom (if-not (zero? __) + (= 'doom (if-not (zero? 1) 'doom 'more-doom)) "In case of emergency, go fast" (= "pretty fast" - (explain-exercise-velocity __)) + (explain-exercise-velocity :bicycling)) "But admit it when you don't know what to do" - (= __ + (= "is that even exercise?" (explain-exercise-velocity :watching-tv)))