update maps koans with 2018 Olympics

This commit is contained in:
Mike Jansen 2014-11-26 16:01:18 -06:00
parent 2c524896c9
commit 45ea6e3441
2 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@
2
1
1
"Vancouver"
"Sochi"
nil
:key-not-found
true
@ -55,7 +55,7 @@
"February"
1 "January"
2006 2010 2014
"Sochi" "Torino" "Vancouver"]}]
"PyeongChang" "Sochi" "Vancouver"]}]
["06_functions" {"__" [81
20

View File

@ -21,7 +21,7 @@
(= __ (:a {:a 1 :b 2}))
"But map keys need not be keywords"
(= __ ({2006 "Torino" 2010 "Vancouver" 2014 "Sochi"} 2010))
(= __ ({2010 "Vancouver" 2014 "Sochi" 2018 "PyeongChang"} 2014))
"You may not be able to find an entry for a key"
(= __ (get {:a 1 :b 2} :c))
@ -43,8 +43,8 @@
"Often you will need to get the keys, but the order is undependable"
(= (list __ __ __)
(sort (keys {2010 "Vancouver" 2014 "Sochi" 2006 "Torino"})))
(sort (keys { 2014 "Sochi" 2018 "PyeongChang" 2010 "Vancouver"})))
"You can get the values in a similar way"
(= (list __ __ __)
(sort (vals {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))))
(sort (vals {2010 "Vancouver" 2014 "Sochi" 2018 "PyeongChang"}))))