Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR ELIXIR

elixir enum chunk_by

Enum.chunk_by(["one", "two", "three", "four", "five"], fn(x) -> String.length(x) end)
[["one", "two"], ["three"], ["four", "five"]]
Enum.chunk_by(["one", "two", "three", "four", "five", "six"], fn(x) -> String.length(x) end)
[["one", "two"], ["three"], ["four", "five"], ["six"]]
Source by elixirschool.com #
 
PREVIOUS NEXT
Tagged: #elixir #enum
ADD COMMENT
Topic
Name
4+1 =