Extract initial example of binding before showing rebinding
This commit is contained in:
@@ -5,7 +5,12 @@ defmodule PatternMatching do
|
||||
assert match?(1, ___)
|
||||
end
|
||||
|
||||
koan "A pattern can change" do
|
||||
koan "A value can be bound to a variable" do
|
||||
a = 1
|
||||
assert a == ___
|
||||
end
|
||||
|
||||
koan "A variable can be rebound" do
|
||||
a = 1
|
||||
a = 2
|
||||
assert a == ___
|
||||
|
||||
@@ -4,6 +4,7 @@ defmodule PatternsTests do
|
||||
|
||||
test "Pattern Matching" do
|
||||
answers = [
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
|
||||
Reference in New Issue
Block a user