Clarify List.delete example
Using numbers in the example tends to confuse the learner about what the purpose of the second argument to delete is. They might think it's an index value. This is further exacerbated by the example's value at index 2 being 2. To clear this up, change the example to use non-numeric values.
This commit is contained in:
@@ -20,7 +20,7 @@ defmodule Lists do
|
|||||||
end
|
end
|
||||||
|
|
||||||
koan "Evolution can have different forms" do
|
koan "Evolution can have different forms" do
|
||||||
assert List.delete([1, 2, 2, 3], 2) == ___
|
assert List.delete([:a, :b, :c], :b) == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
koan "Precision is also valued" do
|
koan "Precision is also valued" do
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ defmodule ListsTests do
|
|||||||
3,
|
3,
|
||||||
[1, 2, :a, "b"],
|
[1, 2, :a, "b"],
|
||||||
[1,2],
|
[1,2],
|
||||||
[1,2,3],
|
[:a, :c],
|
||||||
[1,3],
|
[1,3],
|
||||||
["life", "life", "life"],
|
["life", "life", "life"],
|
||||||
[1, 2, 3, 4, 5],
|
[1, 2, 3, 4, 5],
|
||||||
|
|||||||
Reference in New Issue
Block a user