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.
This commit is contained in:
parent
7718ae4d26
commit
f60275e6e4
@ -43,5 +43,5 @@
|
|||||||
(sort (keys {2010 "Vancouver" 2014 "Sochi" 2006 "Torino"})))
|
(sort (keys {2010 "Vancouver" 2014 "Sochi" 2006 "Torino"})))
|
||||||
|
|
||||||
"You can get the values in a similar way"
|
"You can get the values in a similar way"
|
||||||
(= (list "Sochi" "Torino" __)
|
(= (list __ __ __)
|
||||||
(sort (vals {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))))
|
(sort (vals {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))))
|
||||||
|
Loading…
Reference in New Issue
Block a user