Add Case control flow structre and remove css class

This commit is contained in:
Gustavo Giménez 2018-01-03 21:43:43 -03:00 committed by Gustavo Gimenez
parent c0a545a817
commit 8cd37fc293
1 changed files with 12 additions and 1 deletions

View File

@ -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