Add pipe and pin operators koans

This commit is contained in:
Makis Otman
2016-03-09 09:51:19 +00:00
parent e0c793638f
commit 741e870222
2 changed files with 19 additions and 0 deletions

View File

@@ -5,6 +5,16 @@ defmodule PatternMatching do
assert match?(1, 1)
end
koan "a pattern can change" do
a = 1
assert a = 2
end
koan "a pattern can also be strict" do
a = 1
assert ^a = 2
end
koan "patterns can be used to pull things apart" do
[head | tail] = [1,2,3,4]