Skip to content

Commit

Permalink
Additional reduce string example with accumulator (elixirschool#705)
Browse files Browse the repository at this point in the history
- Added an extra example with strings and accumulator to explain correct order that reducer works
  • Loading branch information
luzeduardo authored and ybur-yug committed Oct 6, 2016
1 parent 602449f commit f1f3b3d
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bg/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions cn/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions es/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions fr/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions gr/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions id/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions it/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions jp/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions ko/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions my/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions no/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions pl/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions pt/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions ru/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions sk/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down
2 changes: 2 additions & 0 deletions vi/lessons/basics/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ iex> Enum.reduce([1, 2, 3], 10, fn(x, acc) -> x + acc end)
16
iex> Enum.reduce([1, 2, 3], fn(x, acc) -> x + acc end)
6
iex> Enum.reduce(["a","b","c"], "1", fn(x,acc)-> x <> acc end)
"cba1"
```

### sort
Expand Down

0 comments on commit f1f3b3d

Please sign in to comment.