Agda-2.6.4: A dependently typed functional programming language and proof assistant
Safe HaskellSafe-Inferred
LanguageHaskell2010

Agda.Utils.Map

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.