Clarify the koan that shows that MapSets are unordered.
This commit is contained in:
@@ -15,8 +15,11 @@ defmodule MapSets do
|
||||
assert MapSet.size(new_set) == ___
|
||||
end
|
||||
|
||||
koan "Even though I am like a list I am unordered after 32 elements" do
|
||||
assert 1..33 |> MapSet.new() |> Enum.fetch(0) == {___, 11}
|
||||
koan "Even though I am like a list I am unordered, especially with 33+ elements" do
|
||||
new_set = MapSet.new 1..33
|
||||
ordered_list = Enum.to_list 1..33
|
||||
assert (ordered_list == MapSet.to_list(new_set)) == __
|
||||
assert (ordered_list == MapSet.to_list(new_set) |> Enum.sort()) == __
|
||||
end
|
||||
|
||||
koan "Does this value exist in the map set?" do
|
||||
|
||||
Reference in New Issue
Block a user