Slide 31
Slide 31 text
Match operator
• a = 1 => 1
• 1 = a => 1
• 2 = a => (MatchError) no match of right hand side value: 1
• list = [1, 2, 3]
• [a, b, c] = list
• [1, b, 3] = list
• [2, 2, 3] = list
• [d, _, _] = list
• { status, _ } = { :ok, ”content” }