Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapWithKey :: (Ord k, Ord (Tag v), HasTag v) => (k -> v -> v) -> BiMap k v -> BiMap k vAgda Agda.Utils.BiMap Changes all the values using the given function, which is also given access to keys. O(n log n). Precondition: See mapWithKeyPrecondition.
mapWithKeyFixedTags :: (k -> v -> v) -> BiMap k v -> BiMap k vAgda Agda.Utils.BiMap Changes all the values using the given function, which is also given access to keys. O(n). Precondition: See mapWithKeyFixedTagsPrecondition. Note that tags must not change.
-
Agda Agda.Utils.BiMap The precondition for mapWithKeyFixedTags f m is that, if m maps k to v, then tag (f k v) == tag v.
mapWithKeyPrecondition :: (Eq k, Eq v, Eq (Tag v), HasTag v) => (k -> v -> v) -> BiMap k v -> BoolAgda Agda.Utils.BiMap The precondition for mapWithKey f m: For any two distinct mappings k₁ ↦ v₁, k₂ ↦ v₂ in m for which the tags of f k₁ v₁ and f k₂ v₂ are defined the values of f must be distinct (f k₁ v₁ ≠ f k₂ v₂). Furthermore tag must be injective for { f k v | (k, v) ∈ m }.
mapLeft :: (a -> c) -> Either a b -> Either c bAgda Agda.Utils.Either 'Either _ b' is a functor.
mapRight :: (b -> d) -> Either a b -> Either a dAgda Agda.Utils.Either 'Either a' is a functor.
mapWithEdge :: (Edge n e -> e') -> Graph n e -> Graph n e'Agda Agda.Utils.Graph.AdjacencyMap.Unidirectional A variant of fmap that provides extra information to the function argument. O(n + e).
mapMaybeAndRest :: (a -> Maybe b) -> [a] -> ([b], Suffix a)Agda Agda.Utils.List Like mapMaybe, but additionally return the last partition of the list where the function always returns Nothing. O(n).
mapMaybe :: (a -> Maybe b) -> List1 a -> [b]Agda Agda.Utils.List1 Like mapMaybe.
mapListT :: (m (Maybe (a, ListT m a)) -> n (Maybe (b, ListT n b))) -> ListT m a -> ListT n bAgda Agda.Utils.ListT Boilerplate function to lift MonadReader through the ListT transformer.