update maps koans with 2018 Olympics
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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"})))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user