aivika-transformers-4.3.3: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2015, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.Trans.DoubleLinkedList

Description

Tested with: GHC 7.10.1

An imperative double-linked list.

Synopsis

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.

listFirst :: MonadRef m => DoubleLinkedList m a -> Event m a Source

Return the first element.

listLast :: MonadRef m => DoubleLinkedList m a -> Event m a Source

Return the last element.