Add example of lists not support partial match
This commit is contained in:
@@ -55,6 +55,12 @@ defmodule PatternMatching do
|
||||
assert make == ___
|
||||
end
|
||||
|
||||
koan "Lists must match exactly" do
|
||||
assert_raise ___, fn ->
|
||||
[a, b] = [1,2,3]
|
||||
end
|
||||
end
|
||||
|
||||
koan "The pattern can make assertions about what it expects" do
|
||||
assert match?([1, _second, _third], ___)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user