|
|
|
|
|
Description |
Module abstracting the peer map implementation.
This is abstracted separately since the speed of peermap updates can
be a significant part of the total runtime, and as such changing the
implementation should be easy in case it's needed.
|
|
Synopsis |
|
|
|
|
Type definitions
|
|
|
Our key type.
|
|
|
Our element type.
|
|
|
The definition of a peer map.
|
|
Initialization functions
|
|
|
Create a new empty map.
|
|
|
Our reverse-compare function.
|
|
|
Add or update (via a custom function) an element.
|
|
|
:: Elem -> Elem -> Elem | function used to merge the elements
| -> [(Key, Elem)] | source data
| -> PeerMap | results
| Create a PeerMap from an association list, with possible duplicates.
|
|
|
Basic operations
|
|
|
Returns either the value for a key or zero if not found.
|
|
|
Add an element to a peermap, overwriting the previous value.
|
|
|
Remove an element from a peermap.
|
|
|
Find the maximum element.
Since this is a sorted list, we just get the value at the head of
the list, or zero for a null list
|
|
Produced by Haddock version 2.6.0 |