Made conditionals exercises more novice friendly.

This commit is contained in:
Brian Dawn 2015-06-14 11:09:15 -05:00
parent 3ddfe960b0
commit 29aedc3a6a

View File

@ -1,14 +1,12 @@
(ns koans.07-conditionals
(:require [koan-engine.core :refer :all]))
(defn explain-defcon-level [exercise-term]
(defn explain-exercise-velocity [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?))
:bicycling "pretty fast"
:jogging "not super fast"
:walking "not fast at all"
"is that even exercise?"))
(meditations
"You will face many decisions"
@ -40,10 +38,10 @@
'doom
'more-doom))
"In case of emergency, sound the alarms"
(= :sirens
(explain-defcon-level __))
"In case of emergency, go fast"
(= "pretty fast"
(explain-exercise-velocity __))
"But admit it when you don't know what to do"
(= __
(explain-defcon-level :yo-mama)))
(explain-exercise-velocity :watching-tv)))