@@ -20,11 +20,11 @@ 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
|
||||||
assert List.delete_at([1, 2, 3], 1) == ___
|
assert List.delete_at([:a, :b, :c], 2) == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
koan "Replication is also possible" do
|
koan "Replication is also possible" do
|
||||||
@@ -63,6 +63,10 @@ defmodule Lists do
|
|||||||
assert List.wrap("value") == ___
|
assert List.wrap("value") == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
|
koan "Wrapping nothing produces a list of nothing" do
|
||||||
|
assert List.wrap(nil) == ___
|
||||||
|
end
|
||||||
|
|
||||||
koan "When there is already a list do not wrap it again" do
|
koan "When there is already a list do not wrap it again" do
|
||||||
assert List.wrap(["value"]) == ___
|
assert List.wrap(["value"]) == ___
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ defmodule ListsTests do
|
|||||||
3,
|
3,
|
||||||
[1, 2, :a, "b"],
|
[1, 2, :a, "b"],
|
||||||
[1,2],
|
[1,2],
|
||||||
[1,2,3],
|
[:a, :c],
|
||||||
[1,3],
|
[:a, :b],
|
||||||
["life", "life", "life"],
|
["life", "life", "life"],
|
||||||
[1, 2, 3, 4, 5],
|
[1, 2, 3, 4, 5],
|
||||||
[1, 4, 2, 3],
|
[1, 4, 2, 3],
|
||||||
@@ -18,6 +18,7 @@ defmodule ListsTests do
|
|||||||
[1, 2, 3, 4],
|
[1, 2, 3, 4],
|
||||||
{1, 2, 3},
|
{1, 2, 3},
|
||||||
["value"],
|
["value"],
|
||||||
|
[],
|
||||||
["value"],
|
["value"],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user