grouped-list

Grouped lists. Equal consecutive elements are grouped.

https://github.com/Daniel-Diaz/grouped-list/blob/master/README.md

Version on this page:0.2.1.4
LTS Haskell 20.26:0.2.3.0
Stackage Nightly 2022-11-17:0.2.3.0
Latest on Hackage:0.2.3.0

See all snapshots grouped-list appears in

BSD-3-Clause licensed by Daniel Díaz
Maintained by [email protected]
This version can be pinned in stack with:grouped-list-0.2.1.4@sha256:aca880feda01f3e8662e1f746c1aaf9a47110c6b41aa1949a3462e34ff9c63af,2071

Module documentation for 0.2.1.4

grouped-list

Welcome to the grouped-list repository.

We are at an early stage of development, but contributions are more than welcome. If you are interested, feel free to submit a pull request.

What is this about?

This library defines the type of grouped lists, Grouped. Values of this type are lists with a finite number of elements. The only special feature is that consecutive elements that are equal on the list are internally represented as a single element annotated with the number of repetitions. Therefore, operations on lists that have many consecutive repetitions perform much better, and memory usage is reduced. However, this type is suboptimal for lists that do not have many consecutive repetitions. We are trying to ameliorate this.

Automatic build

Build Status

Changes

0.1.3.0

  • IsList instance to use with the OverloadedLists language extension.

  • Addition of take and drop.

  • Two test suites added, one with example-based tests, and other with property-based tests.

0.1.2.0

  • Addition of adjustM.

0.1.1.0

  • Addition of empty.