Safe Haskell | Unsafe |
---|---|
Language | Haskell2010 |
This module exports the internal representation of NonEmptyDList
.
Use with care. It's very easy to break the safe interface:
>>>
let nedl = NEDL ((1 :|) . map (+1))
>>>
nedl <> nedl
fromNonEmpty (1 :| [2])
Synopsis
- newtype NonEmptyDList a = NEDL {}
Documentation
newtype NonEmptyDList a Source #
A difference list is a function that, given a list, returns the original contents of the difference list prepended to the given list.
Implemented as a newtype over [a] ->
.NonEmpty
a