Safe Haskell | None |
---|---|
Language | Haskell2010 |
See Data.Rsv for an overview of what "reservation" data structures are.
This module implements a list, where each insert is appended to its tail.
Documentation
Read operations
Write operations
insert :: a -> RList a -> (Delete a, RList a) Source
Add an item to the list, returning a handle to delete it with. The same item may be added twice, in which case it will occupy multiple positions in the list, and the handles distinguish these occurences.
type Delete a = RList a -> (Maybe a, RList a) Source
A list-transition that removes and retrieves the earlier-added item.
If the item was already removed, Nothing
is returned instead.