Difference list implementation for Curry
Author: Jan Tikovsky
Version: October 2017
empty
:: DList a
Create an empty diff list |
singleton
:: a -> DList a
Create a diff list with a single element |
cons
:: a -> DList a -> DList a
Prepend an element to a diff list |
append
:: DList a -> DList a -> DList a
Append two diff lists |
fromList
:: [a] -> DList a
Convert a list to a diff list |
toList
:: DList a -> [a]
Convert a diff list to a list |
toListNub
:: Eq a => DList a -> [a]
Convert a diff list to a duplicate free list |
hd
:: DList a -> a
Get the head element of a diff list |
tl
:: DList a -> DList a
Get the tail of a diff list |
Constructors:
DL
:: ([a] -> [a]) -> DList a
Fields:
unDL
:: ([a] -> [a])
Create an empty diff list
|