From 5b234f8edfc1141af0deac22144ddf4309ab18cb Mon Sep 17 00:00:00 2001 From: Oli Clive-Griffin Date: Thu, 3 Jun 2021 13:49:54 +1200 Subject: [PATCH] sets done --- src/koans/05_sets.clj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/koans/05_sets.clj b/src/koans/05_sets.clj index a6e631f..324f420 100644 --- a/src/koans/05_sets.clj +++ b/src/koans/05_sets.clj @@ -4,19 +4,19 @@ (meditations "You can create a set by converting another collection" - (= #{3} (set __)) + (= #{3} (set '(3))) "Counting them is like counting other collections" - (= __ (count #{1 2 3})) + (= 3 (count #{1 2 3})) "Remember that a set is a *mathematical* set" - (= __ (set '(1 1 2 2 3 3 4 4 5 5))) + (= #{1 2 3 4 5} (set '(1 1 2 2 3 3 4 4 5 5))) "You can ask clojure for the union of two sets" - (= __ (set/union #{1 2 3 4} #{2 3 5})) + (= #{1 2 3 4 5} (set/union #{1 2 3 4} #{2 3 5})) "And also the intersection" - (= __ (set/intersection #{1 2 3 4} #{2 3 5})) + (= #{2 3} (set/intersection #{1 2 3 4} #{2 3 5})) "But don't forget about the difference" - (= __ (set/difference #{1 2 3 4 5} #{2 3 5}))) + (= #{1 4} (set/difference #{1 2 3 4 5} #{2 3 5})))