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,
is a function that prepends elements to its parameter. Thus the
operation is just function composition. Ultimately, a
DList is converted to a
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
We cannot test equality on two
DList structures without converting them
to regular lists.