aivika-1.1: A multi-paradigm simulation library

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

Simulation.Aivika.DoubleLinkedList

Description

Tested with: GHC 7.6.3

An imperative double-linked list.

Synopsis

Documentation

listNull :: DoubleLinkedList a -> IO Bool Source

Test whether the list is empty.

listCount :: DoubleLinkedList a -> IO Int Source

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 a Source

Return the first element.

listLast :: DoubleLinkedList a -> IO a Source

Return the last element.