|Maintainer||Brandon Simmons <email@example.com>|
Provides functions for the awkward task of dividing a list into sub-lists, based on some predicate function, or based on some integer offset (e.g. dividing a list into lists of three elements each.
We could abstract out some common patterns, but I want the code to be copy-and-pasteable. I'm hoping that this module can eventually contain the most efficient implementation possible of these functions, and would appreciate any suggestions or patches. Please also send any suggestions for other useful list-grouping functions.
Please send me any requests, bugs, or improvements to this module!
Grouping by integer offsets:
partitions list into lengths corresponding the list of Ints supplied. if we run out of lengths, the remaining tail is returned as last element.
splitWith but we drop the end of our list should we run out of
Grouping by predicate:
partitions list before every element matching predicate:
partitions list after every element matching predicate: