krisajenkins/elm-exts/8.0.0

NOTE: this package is not compatible with Elm 0.19.1

Exts.List

Extensions to the core List library.

chunk : Int -> List a -> List (List a)

Split a list into chunks of length n.

Be aware that the last sub-list may be smaller than n-items long.

For example chunk 3 [1,2,3,4,5,6,7,8,9,10] => [[1,2,3], [4,5,6], [7,8,9], [10]]