grouped-list: Grouped lists. Equal consecutive elements are grouped.

[ bsd3, data, library ] [ Propose Tags ]

Grouped lists work like regular lists, except for two conditions:

  • Grouped lists are always finite. Attempting to construct an infinite grouped list will result in an infinite loop.

  • Grouped lists internally represent consecutive equal elements as only one, hence the name of grouped lists.

This mean that grouped lists are ideal for cases where the list has many repetitions (like [1,1,1,1,7,7,7,7,7,7,7,7,2,2,2,2,2], although they might present some deficiencies in the absent of repetitions.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,,,,,
Change log
Dependencies base (>=4.8 && <4.17), binary, containers, deepseq, pointed, transformers [details]
License BSD-3-Clause
Author Daniel Díaz
Category Data
Home page
Bug tracker
Source repo head: git clone
Uploaded by DanielDiaz at 2022-03-15T11:27:55Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 8385 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-15 [all 1 reports]

Readme for grouped-list-

[back to package description]


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