diff --git a/src/koans/maps.clj b/src/koans/maps.clj index 9d53151..4bc0e2e 100644 --- a/src/koans/maps.clj +++ b/src/koans/maps.clj @@ -3,13 +3,13 @@ (= {} (hash-map)) "Maps in clojure associate keys with values" - (= __ (.size (hash-map))) + (= __ (count (hash-map))) "A value must be supplied for each key" (= {:a 1} (hash-map :a __)) "The size is the number of entries" - (= __ (.size {:a 1 :b 2})) + (= __ (count {:a 1 :b 2})) "You can look up the value for a given key" (= __ (get {:a 1 :b 2} :b)) diff --git a/src/koans/sets.clj b/src/koans/sets.clj index 0823c3a..60a6575 100644 --- a/src/koans/sets.clj +++ b/src/koans/sets.clj @@ -3,7 +3,7 @@ (= #{} (set nil)) "They are another important data structure in clojure" - (= __ (.size #{})) + (= __ (count #{1 2 3})) "Remember that a set is a 'set'" (= __ (set '(1 1 2 2 3 3 4 4 5 5))) diff --git a/src/koans/vectors.clj b/src/koans/vectors.clj index b0500f3..b1b97ea 100644 --- a/src/koans/vectors.clj +++ b/src/koans/vectors.clj @@ -1,6 +1,6 @@ (meditations "You can use vectors in clojure to create an 'Array' like structure" - (= __ (.size [])) + (= __ (count [42])) "You can create a vector in several ways" (= __ (vec nil)) diff --git a/src/path_to_answer_sheet.clj b/src/path_to_answer_sheet.clj index 00b13da..4a84227 100644 --- a/src/path_to_answer_sheet.clj +++ b/src/path_to_answer_sheet.clj @@ -21,7 +21,7 @@ [:b :c :d :e] "\"No dice!\"" "()"]} - "vectors" {"__" [0 + "vectors" {"__" [1 [] [1] [nil] @@ -31,7 +31,7 @@ :jelly :jelly [:butter :and]]} - "sets" {"__" [0 + "sets" {"__" [3 #{1 2 3 4 5} #{1 2 3 4 5} #{2 3}