This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.1.0
DList is a representation of lists with an efficient append operation
version 1.1.1
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.1.1
Committed At 2017-04-18 14:21:15 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

difference-list

Build Status

An Elm-language representation of lists with an efficient append operation.

This is particularly useful for efficient logging and pretty printing, where repeatedly appending lists quickly becomes too expensive. Internally, DList is a function that prepends elements to its parameter. Thus the append operation is just function composition. Ultimately, a DList is converted to a regular List by applying the function to the empty list.

Some limitations of the DList representation are:

  • We cannot ask for the length of a DList without converting it to a regular list.

  • We cannot test equality on two DList structures without converting them to regular lists.

See also: http://package.elm-lang.org/packages/league/difference-list/