Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Ref.Map
- data Map f
- empty :: Map f
- singleton :: Ref a -> f a -> Map f
- null :: Map f -> Bool
- size :: Map f -> Int
- member :: Ref a -> Map f -> Bool
- lookup :: Ref a -> Map f -> Maybe (f a)
- insert :: Ref a -> f a -> Map f -> Map f
- delete :: Ref a -> Map f -> Map f
- adjust :: (f a -> f b) -> Ref a -> Map f -> Map f
- union :: Map f -> Map f -> Map f
- difference :: Map f -> Map f -> Map f
- intersection :: Map f -> Map f -> Map f
- map :: (f a -> f b) -> Map f -> Map f
- filter :: (f a -> Bool) -> Map f -> Map f
Documentation
lookup :: Ref a -> Map f -> Maybe (f a) Source
Returns the value associated with the reference, or Nothing
if the reference
has no value associated to it.
insert :: Ref a -> f a -> Map f -> Map f Source
Associates a reference with the specified value. If the map already contains a mapping for the reference, the old value is replaced.
delete :: Ref a -> Map f -> Map f Source
Removes the associated value of a reference, if any is present in the map.
adjust :: (f a -> f b) -> Ref a -> Map f -> Map f Source
Updates the associated value of a reference, if any is present in the map.
difference :: Map f -> Map f -> Map f Source
Difference of two maps.
intersection :: Map f -> Map f -> Map f Source
Intersectino of two maps.