Module Data.DList

Difference list implementation for Curry

Author: Jan Tikovsky

Version: October 2017

Summary of exported operations:

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

Exported datatypes:


DList

Constructors:

  • DL :: ([a] -> [a]) -> DList a

    Fields:

    • unDL :: ([a] -> [a])

Exported operations:

empty :: DList a   

Create an empty diff list

Further infos:
  • solution complete, i.e., able to compute all solutions

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