diff --git a/resources/koans.clj b/resources/koans.clj index 6505ffe..6ae3398 100644 --- a/resources/koans.clj +++ b/resources/koans.clj @@ -79,6 +79,7 @@ false "February" 1 "January" + :c 3 2010 2014 2018 "PyeongChang" "Sochi" "Vancouver"]}] diff --git a/src/koans/06_maps.clj b/src/koans/06_maps.clj index 3466864..d4af87c 100644 --- a/src/koans/06_maps.clj +++ b/src/koans/06_maps.clj @@ -41,6 +41,9 @@ "You can also create a new version with an entry removed" (= {__ __} (dissoc {1 "January" 2 "February"} 2)) + "Create a new map by merging" + (= {:a 1 :b 2 __ __} (merge {:a 1 :b 2} {:c 3})) + "Often you will need to get the keys, but the order is undependable" (= (list __ __ __) (sort (keys { 2014 "Sochi" 2018 "PyeongChang" 2010 "Vancouver"})))