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