Slide 45
Slide 45 text
Pattern Matching Lists
●
[Head|Tail] = [1,2,3]
Head % => 1
Tail % => [2,3]
[First,Second,Third] = [1,2,3]
Second % => 2
[One,Two] = [1,2,3] % ** exception error: no
match of right hand side value [1,2,3]
[First,Second|Rest] = [1,2,3]