Copyright | Copyright (c) 2009-2014, David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 7.8.3
An imperative double-linked list.
- data DoubleLinkedList m a
- listNull :: ProtoRefMonad m => DoubleLinkedList m a -> m Bool
- listCount :: ProtoRefMonad m => DoubleLinkedList m a -> m Int
- newList :: ProtoRefMonad m => Session m -> m (DoubleLinkedList m a)
- listInsertFirst :: ProtoRefMonad m => DoubleLinkedList m a -> a -> m ()
- listAddLast :: ProtoRefMonad m => DoubleLinkedList m a -> a -> m ()
- listRemoveFirst :: ProtoRefMonad m => DoubleLinkedList m a -> m ()
- listRemoveLast :: ProtoRefMonad m => DoubleLinkedList m a -> m ()
- listFirst :: ProtoRefMonad m => DoubleLinkedList m a -> m a
- listLast :: ProtoRefMonad m => DoubleLinkedList m a -> m a
Documentation
data DoubleLinkedList m a Source
The DoubleLinkedList
type represents an imperative double-linked list.
listNull :: ProtoRefMonad m => DoubleLinkedList m a -> m Bool Source
Test whether the list is empty.
listCount :: ProtoRefMonad m => DoubleLinkedList m a -> m Int Source
Return the number of elements in the list.
newList :: ProtoRefMonad m => Session m -> m (DoubleLinkedList m a) Source
Create a new list.
listInsertFirst :: ProtoRefMonad m => DoubleLinkedList m a -> a -> m () Source
Insert a new element in the beginning.
listAddLast :: ProtoRefMonad m => DoubleLinkedList m a -> a -> m () Source
Add a new element to the end.
listRemoveFirst :: ProtoRefMonad m => DoubleLinkedList m a -> m () Source
Remove the first element.
listRemoveLast :: ProtoRefMonad m => DoubleLinkedList m a -> m () Source
Remove the last element.
listFirst :: ProtoRefMonad m => DoubleLinkedList m a -> m a Source
Return the first element.
listLast :: ProtoRefMonad m => DoubleLinkedList m a -> m a Source
Return the last element.