Makes changing pattern more obvious

This commit is contained in:
Rabea Gleissner
2016-04-26 12:24:57 +01:00
parent 9ec6089bde
commit 919b877d51
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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",