From 1d09a984e7e29978ec2254155cf8f637ff7fc4ae Mon Sep 17 00:00:00 2001 From: Nuno Marques Date: Thu, 30 Sep 2010 14:14:07 +0200 Subject: [PATCH] changed the order of some exercises and removed a confusing map entry Signed-off-by: Colin Jones --- src/koans/maps.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/koans/maps.clj b/src/koans/maps.clj index 9f62b06..9d53151 100644 --- a/src/koans/maps.clj +++ b/src/koans/maps.clj @@ -1,10 +1,10 @@ (meditations - "Maps in clojure associate keys with values" - (= __ (.size (hash-map))) - "There are two ways to create maps" (= {} (hash-map)) + "Maps in clojure associate keys with values" + (= __ (.size (hash-map))) + "A value must be supplied for each key" (= {:a 1} (hash-map :a __)) @@ -33,7 +33,7 @@ (= __ (contains? {:a nil :b nil} :c)) "Maps are immutable, but you can create a new, 'changed' version" - (= {1 "January" 2 __} (assoc {1 "January" 2 "Febuary"} 2 "February")) + (= {1 "January" 2 __} (assoc {1 "January" } 2 "February")) "You can also 'remove' an entry" (= {__ __} (dissoc {1 "January" 2 "February"} 2))