introduce MapSet.size/1 earlier

specifically, before it is used to show sets do not have duplicates
This commit is contained in:
Cohen Carlisle
2018-03-01 13:49:08 -05:00
parent 18ce1752d4
commit 432988014a
2 changed files with 5 additions and 5 deletions

View File

@@ -9,6 +9,10 @@ defmodule MapSets do
assert Enum.fetch(@set, 0) == {:ok, ___}
end
koan "How large is my map set?" do
assert MapSet.size(@set) == ___
end
koan "However, I do not allow duplication" do
new_set = MapSet.new([1, 1, 2, 3, 3, 3])
@@ -56,10 +60,6 @@ defmodule MapSets do
assert MapSet.member?(modified_set, 1) == ___
end
koan "How large is my map set?" do
assert MapSet.size(@set) == ___
end
koan "Are these maps twins?" do
new_set = MapSet.new([1, 2, 3])

View File

@@ -5,13 +5,13 @@ defmodule MapSetsTest do
test "MapSets" do
answers = [
1,
5,
3,
{:multiple, [false, true]},
true,
{:multiple, [true, false]},
true,
false,
5,
false,
true,
7,