introduce MapSet.size/1 earlier
specifically, before it is used to show sets do not have duplicates
This commit is contained in:
@@ -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])
|
||||
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user