We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9971276 commit 2949693Copy full SHA for 2949693
lib/elixir/lib/enum.ex
@@ -374,8 +374,15 @@ defmodule Enum do
374
end
375
376
@doc """
377
- Splits enumerable on every element for which `fun` returns a new
378
- value.
+ Chunks the `enum` with fine grained control when every chunk is emitted.
+
379
+ `chunk_fun` receives the current element and the accumulator and
380
+ must return `{:cont, element, acc}` to emit the given chunk and
381
+ continue with accumulator or `{:cont, acc}` to not emit any chunk
382
+ and continue with the return accumulator.
383
384
+ `after_fun` is invoked when iteration is done and must also return
385
+ `{:cont, element, acc}` or `{:cont, acc}`.
386
387
Returns a list of lists.
388
0 commit comments