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

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

Simulation.Aivika.Trans.DoubleLinkedList

Description

Tested with: GHC 7.8.3

An imperative double-linked list.

Synopsis

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.