Skip to content

Commit 3b92c0d

Browse files
authored
Fix map_reduce result (#12881)
1 parent fddb26d commit 3b92c0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/pages/cheatsheets/enum-cheat.cheatmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ iex> Enum.reduce(cart, 0, fn item, acc ->
163163
iex> Enum.map_reduce(cart, 0, fn item, acc ->
164164
...> {item.fruit, item.count + acc}
165165
...> end)
166-
[{"apple", 3}, {"banana", 4}, {"orange", 10}]
166+
{["apple", "banana", "orange"], 10}
167167
```
168168

169169
### [scan(enum, acc, fun)](`Enum.scan/3`)

0 commit comments

Comments
 (0)