Makes changing pattern more obvious
This commit is contained in:
@@ -7,7 +7,8 @@ defmodule PatternMatching do
|
|||||||
|
|
||||||
koan "A pattern can change" do
|
koan "A pattern can change" do
|
||||||
a = 1
|
a = 1
|
||||||
assert a = ___
|
a = 2
|
||||||
|
assert (a == 2) == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
koan "A pattern can also be strict" do
|
koan "A pattern can also be strict" do
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ defmodule PatternsTests do
|
|||||||
test "Pattern Matching" do
|
test "Pattern Matching" do
|
||||||
answers = [
|
answers = [
|
||||||
1,
|
1,
|
||||||
2,
|
true,
|
||||||
1,
|
1,
|
||||||
{:multiple, [1, [2,3,4]]},
|
{:multiple, [1, [2,3,4]]},
|
||||||
[1,2,3,4],
|
[1,2,3,4],
|
||||||
@@ -13,7 +13,7 @@ defmodule PatternsTests do
|
|||||||
"eggs, milk",
|
"eggs, milk",
|
||||||
"Honda",
|
"Honda",
|
||||||
[1,2,3],
|
[1,2,3],
|
||||||
{:multiple, ["Meow", "Woof", "Eh?",]},
|
{:multiple, ["Meow", "Woof", "Eh?"]},
|
||||||
{:multiple, ["Mickey", "Donald", "I need a name!"]},
|
{:multiple, ["Mickey", "Donald", "I need a name!"]},
|
||||||
"dog",
|
"dog",
|
||||||
"Max",
|
"Max",
|
||||||
|
|||||||
Reference in New Issue
Block a user