From 9dcfe99b90fcbca05ad70c6973e4fe72c1d8af6c Mon Sep 17 00:00:00 2001 From: Laura Brown Date: Mon, 2 Sep 2013 20:12:29 -0400 Subject: [PATCH] Update 05_maps.clj "Often you will need to get the keys, but the order is undependable" The keys value pairs are already ordered by key. Why not make the original map un-ordered to force the user to think about sorting them? "You can get the values in a similar way" Two of the three values are already provided in the answer, the answer to this challenge can be arrived at by providing the missing one through process of elimination without thinking about sorting. --- src/koans/05_maps.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/koans/05_maps.clj b/src/koans/05_maps.clj index d6102c0..4e3825a 100644 --- a/src/koans/05_maps.clj +++ b/src/koans/05_maps.clj @@ -40,8 +40,8 @@ "Often you will need to get the keys, but the order is undependable" (= (list __ __ __) - (sort (keys {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))) + (sort (keys {2010 "Vancouver" 2006 "Torino" 2014 "Sochi"}))) "You can get the values in a similar way" - (= (list "Sochi" "Torino" __) + (= (list __ __ __) (sort (vals {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))))