diff --git a/elixir.md b/elixir.md index d9ed705a5..f67592614 100644 --- a/elixir.md +++ b/elixir.md @@ -105,7 +105,6 @@ Pattern matching works in function parameters too. Control flow ------------ -{: .-three-column} ### If @@ -116,6 +115,18 @@ else "This will" end ``` +### Case + +```elixir +case {1, 2, 3} do + {4, 5, 6} -> + "This clause won't match" + {1, x, 3} -> + "This clause will match and bind x to 2 in this clause" + _ -> + "This clause would match any value" +end +``` ### Cond