Enum.chunk_by
You're seeing just the function
chunk_by
, go back to Enum module for more information.
Specs
Splits enumerable on every element for which fun
returns a new
value.
Returns a list of lists.
Examples
iex> Enum.chunk_by([1, 2, 2, 3, 4, 4, 6, 7, 7], &(rem(&1, 2) == 1))
[[1], [2, 2], [3], [4, 4, 6], [7, 7]]