Agda-2.8.0: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Utils.Map

Contents

- Monadic map operations
- Non-monadic map operations

Synopsis

- adjustM :: (Functor f, Ord k) => (v -> f v) -> k -> Map k v -> f (Map k v)
- adjustM' :: (Functor f, Ord k) => (v -> f (a, v)) -> k -> Map k v -> f (a, Map k v)
- filterKeys :: (k -> Bool) -> Map k a -> Map k a

# Monadic map operations

adjustM :: (Functor f, Ord k) => (v -> f v) -> k -> Map k v -> f (Map k v) Source #

Update monadically the value at one position (must exist!).

adjustM' :: (Functor f, Ord k) => (v -> f (a, v)) -> k -> Map k v -> f (a, Map k v) Source #

Wrapper for `adjustM` for convenience.

# Non-monadic map operations

filterKeys :: (k -> Bool) -> Map k a -> Map k a Source #

Filter a map based on the keys.