Chunks of a list #
Batteries' List.toChunks n l cuts l into consecutive chunks of n elements, in order; the last
chunk may be shorter, and n = 0 gives the whole list as one chunk. Batteries states no lemmas
about it. This file proves its two basic contracts through the accumulator loop toChunks.go.
Main results #
List.flatten_toChunks: the chunks flatten back to the list.List.length_pos_and_le_of_mem_toChunks: for0 < n, every chunk has between1andnelements.