Merge pull request #81 from mjansen401/master
update maps koans with 2018 Olympics
This commit is contained in:
commit
ea8922daf1
@ -47,7 +47,7 @@
|
|||||||
2
|
2
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
"Vancouver"
|
"Sochi"
|
||||||
nil
|
nil
|
||||||
:key-not-found
|
:key-not-found
|
||||||
true
|
true
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"February"
|
"February"
|
||||||
1 "January"
|
1 "January"
|
||||||
2006 2010 2014
|
2006 2010 2014
|
||||||
"Sochi" "Torino" "Vancouver"]}]
|
"PyeongChang" "Sochi" "Vancouver"]}]
|
||||||
|
|
||||||
["06_functions" {"__" [81
|
["06_functions" {"__" [81
|
||||||
20
|
20
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
(= __ (:a {:a 1 :b 2}))
|
(= __ (:a {:a 1 :b 2}))
|
||||||
|
|
||||||
"But map keys need not be keywords"
|
"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"
|
"You may not be able to find an entry for a key"
|
||||||
(= __ (get {:a 1 :b 2} :c))
|
(= __ (get {:a 1 :b 2} :c))
|
||||||
@ -43,8 +43,8 @@
|
|||||||
|
|
||||||
"Often you will need to get the keys, but the order is undependable"
|
"Often you will need to get the keys, but the order is undependable"
|
||||||
(= (list __ __ __)
|
(= (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"
|
"You can get the values in a similar way"
|
||||||
(= (list __ __ __)
|
(= (list __ __ __)
|
||||||
(sort (vals {2006 "Torino" 2010 "Vancouver" 2014 "Sochi"}))))
|
(sort (vals {2010 "Vancouver" 2014 "Sochi" 2018 "PyeongChang"}))))
|
||||||
|
Loading…
Reference in New Issue
Block a user