| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mikan.Utils.HashSet.Ordered
Description
Mutable hash sets that preserve insertion order.
Documentation
Size and capacity
Creation
Insertion
Arguments
| :: Eq a | |
| => HashSet a | The |
| -> a | The element to insert. |
| -> Int | Its precomputed hash. |
| -> (a -> Int -> IO r) | Continuation to invoke if the element was already present in the table. |
| -> (Int -> IO r) | Continuation to invoke if the element was not present in the table. |
| -> IO r |
Insert a a pre-hashed element in the HashSet, calling one of the
continuations depending on whether the element has been newly added
or whether it was already present. Both continuations receive an
Int index for the element in that HashSet (see index).
This function is lazy in the element to insert, the assumption being that computing the hash should already have forced it.