Merge branch 'pr-347'
* pr-347: elixir: shorten some sentences fix concat result Add Case control flow structre and remove css class
This commit is contained in:
commit
7e6f7293cd
14
elixir.md
14
elixir.md
|
@ -116,6 +116,18 @@ else
|
||||||
"This will"
|
"This will"
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
### Case
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
case {1, 2, 3} do
|
||||||
|
{4, 5, 6} ->
|
||||||
|
"This clause won't match"
|
||||||
|
{1, x, 3} ->
|
||||||
|
"This will match and bind x to 2"
|
||||||
|
_ ->
|
||||||
|
"This will match any value"
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
### Cond
|
### Cond
|
||||||
|
|
||||||
|
@ -466,7 +478,7 @@ list |> any?() # → true
|
||||||
```
|
```
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
list |> concat([:d]) # → [:d]
|
list |> concat([:d]) # → [:a, :b, :c, :d]
|
||||||
```
|
```
|
||||||
|
|
||||||
Also, consider streams instead.
|
Also, consider streams instead.
|
||||||
|
|
Loading…
Reference in New Issue