@hackage grouped-list0.2.1.0

Grouped lists. Equal consecutive elements are grouped.

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.

Warning: this library is in early development.