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 fa920eb commit 59a99f9Copy full SHA for 59a99f9
lib/elixir/lib/enum.ex
@@ -335,7 +335,7 @@ defmodule Enum do
335
elements are taken as necessary from `leftover` if it was passed.
336
337
If `leftover` is passed and does not have enough elements to fill the
338
- chunk, then the chunk is returned anyway with less than `count`
+ chunk, then a partial chunk is returned with less than `count`
339
elements. If `leftover` is not passed at all or is `nil`, then the
340
partial chunk is discarded from the result.
341
@@ -350,8 +350,8 @@ defmodule Enum do
350
iex> Enum.chunk([1, 2, 3, 4, 5, 6], 3, 2, [7])
351
[[1, 2, 3], [3, 4, 5], [5, 6, 7]]
352
353
- iex> Enum.chunk([1, 2, 3, 4, 5, 6], 3, 3, [])
354
- [[1, 2, 3], [4, 5, 6]]
+ iex> Enum.chunk([1, 2, 3, 4], 3, 3, [])
+ [[1, 2, 3], [4]]
355
356
"""
357
@spec chunk(t, pos_integer, pos_integer, t | nil) :: [list]
0 commit comments