Skip to content

Commit

Permalink
Add case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Jones and Mike Jansen committed Apr 29, 2011
1 parent ff7623f commit 7408b16
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -119,6 +119,7 @@ have any questions or want more direction before you start pitching in.
- Alex Robbins
- Jaskirat Singh Veen
- Mark Simpson
- Mike Jansen


### Credits
Expand Down
1 change: 0 additions & 1 deletion ideaboard.txt
Expand Up @@ -19,7 +19,6 @@ Pre and Post conditions of functions
Particular Functions
=====
vector-of
case
flatten
frequencies
group-by
Expand Down
21 changes: 19 additions & 2 deletions src/koans/conditionals.clj
@@ -1,3 +1,12 @@
(defn explain-defcon-level [exercise-term]
(case exercise-term
:fade-out :you-and-what-army
:double-take :call-me-when-its-important
:round-house :o-rly
:fast-pace :thats-pretty-bad
:cocked-pistol :sirens
:say-what?))

(meditations
"You will face many decisions"
(= __ (if (false? (= 4 5))
Expand All @@ -8,7 +17,7 @@
(= __ (if (> 4 3)
[]))

"And in such a case you may have nothing"
"And in such a situation you may have nothing"
(= nil (if (nil? __)
[:a :b :c]))

Expand All @@ -26,5 +35,13 @@
"Or your fate may be sealed"
(= __ (if-not (zero? __)
'doom
'doom)))
'doom))

"In case of emergency, sound the alarms"
(= :sirens
(explain-defcon-level __))

"But admit it when you don't know what to do"
(= __
(explain-defcon-level :yo-mama)))

4 changes: 3 additions & 1 deletion src/path_to_answer_sheet.clj
Expand Up @@ -70,7 +70,9 @@
0
:glory
4 6 :your_road
''doom 0 ]}
''doom 0
:cocked-pistol
:say-what?]}

"higher_order_functions" {"__" [4 8 12
'(* x x)
Expand Down

0 comments on commit 7408b16

Please sign in to comment.