Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | Safe-Inferred |
Tested with: GHC 7.6.3
An imperative double-linked list.
- data DoubleLinkedList a
- listNull :: DoubleLinkedList a -> IO Bool
- listCount :: DoubleLinkedList a -> IO Int
- newList :: IO (DoubleLinkedList a)
- listInsertFirst :: DoubleLinkedList a -> a -> IO ()
- listAddLast :: DoubleLinkedList a -> a -> IO ()
- listRemoveFirst :: DoubleLinkedList a -> IO ()
- listRemoveLast :: DoubleLinkedList a -> IO ()
- listFirst :: DoubleLinkedList a -> IO a
- listLast :: DoubleLinkedList a -> IO a
Documentation
data DoubleLinkedList a Source
The DoubleLinkedList
type represents an imperative double-linked list.
listNull :: DoubleLinkedList a -> IO BoolSource
Test whether the list is empty.
listCount :: DoubleLinkedList a -> IO IntSource
Return the number of elements in the list.
newList :: IO (DoubleLinkedList a)Source
Create a new list.
listInsertFirst :: DoubleLinkedList a -> a -> IO ()Source
Insert a new element in the beginning.
listAddLast :: DoubleLinkedList a -> a -> IO ()Source
Add a new element to the end.
listRemoveFirst :: DoubleLinkedList a -> IO ()Source
Remove the first element.
listRemoveLast :: DoubleLinkedList a -> IO ()Source
Remove the last element.
listFirst :: DoubleLinkedList a -> IO aSource
Return the first element.
listLast :: DoubleLinkedList a -> IO aSource
Return the last element.