File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1214,7 +1214,7 @@ defmodule Enum do
1214
1214
end
1215
1215
1216
1216
@ doc """
1217
- Maps the given `fun` over `enumerable` and flattens the result.
1217
+ Maps the given `fun` over `enumerable` and flattens the result only one level deep .
1218
1218
1219
1219
This function returns a new enumerable built by appending the result of invoking `fun`
1220
1220
on each element of `enumerable` together; conceptually, this is similar to a
@@ -1262,13 +1262,16 @@ defmodule Enum do
1262
1262
defp flat_reverse ( [ ] , acc ) , do: acc
1263
1263
1264
1264
@ doc """
1265
- Maps and reduces an `enumerable`, flattening the given results ( only one level deep) .
1265
+ Maps and reduces an `enumerable`, flattening the results only one level deep.
1266
1266
1267
1267
It expects an accumulator and a function that receives each enumerable
1268
1268
element, and must return a tuple containing a new enumerable (often a list)
1269
1269
with the new accumulator or a tuple with `:halt` as first element and
1270
1270
the accumulator as second.
1271
1271
1272
+ Returns a 2-element tuple where the first element is the results flattened one level deep and
1273
+ the second element is the last accumulator.
1274
+
1272
1275
## Examples
1273
1276
1274
1277
iex> enumerable = 1..100
You can’t perform that action at this time.
0 commit comments