Assert on tail

This commit is contained in:
Uku Taht
2016-03-08 13:00:32 +02:00
parent 1a19c30ec1
commit 8be24a7e75

View File

@@ -6,9 +6,10 @@ defmodule PatternMatching do
end
koan "patterns can be used to pull things apart" do
[head | _tail] = [1,2,3,4]
[head | tail] = [1,2,3,4]
assert head == 1
assert tail == [2,3,4]
end
koan "or put them back together" do