From 68dcde939ef7b89ea563d6f912f1a900697450bb Mon Sep 17 00:00:00 2001 From: Attila Domokos Date: Fri, 22 Nov 2013 13:52:20 -0600 Subject: [PATCH] Make if-not example clearer, fix the answer keys I felt the example wasn't very clear as the conditional returned the quoted form of `doom` when it evaluated to true or false. This way the user needs to find a value that satisfies the if-not conditional so it returns `doom` and not `more-doom`. --- resources/koans.clj | 4 ++-- src/koans/07_conditionals.clj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/koans.clj b/resources/koans.clj index 3b36e3f..f28bd7c 100644 --- a/resources/koans.clj +++ b/resources/koans.clj @@ -73,7 +73,7 @@ nil :glory 4 6 :your-road - 'doom 0 + 1 :cocked-pistol :say-what?]}] @@ -208,5 +208,5 @@ '((0 1 2) (3 4)) 5 :hello - (6 :this :are) + (6 :these :are) ]}]] diff --git a/src/koans/07_conditionals.clj b/src/koans/07_conditionals.clj index eaf5711..308d569 100644 --- a/src/koans/07_conditionals.clj +++ b/src/koans/07_conditionals.clj @@ -33,9 +33,9 @@ :else __))) "Or your fate may be sealed" - (= __ (if-not (zero? __) + (= 'doom (if-not (zero? __) 'doom - 'doom)) + 'more-doom)) "In case of emergency, sound the alarms" (= :sirens