Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b

    mtl Control.Monad.Writer.Strict

    Map both the return value and output of a computation using the given function.

  2. mapKeyVal :: (Key -> Key) -> (v1 -> v2) -> KeyMap v1 -> KeyMap v2

    aeson Data.Aeson.KeyMap

    Transform the keys and values of a KeyMap.

  3. mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b

    aeson Data.Aeson.KeyMap

    Map values and collect the Just results.

  4. mapMaybeWithKey :: (Key -> v -> Maybe u) -> KeyMap v -> KeyMap u

    aeson Data.Aeson.KeyMap

    Map values and collect the Just results.

  5. mapWithKey :: (Key -> a -> b) -> KeyMap a -> KeyMap b

    aeson Data.Aeson.KeyMap

    Map a function over all values in the map.

  6. mapFromJSONKeyFunction :: (a -> b) -> FromJSONKeyFunction a -> FromJSONKeyFunction b

    aeson Data.Aeson.Types

    Same as fmap. Provided for the consistency with ToJSONKeyFunction.

  7. mapKeys :: Hashable k2 => (k1 -> k2) -> HashMap k1 v -> HashMap k2 v

    unordered-containers Data.HashMap.Internal

    mapKeys f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case there is no guarantee which of the associated values is chosen for the conflicting key.

    >>> mapKeys (+ 1) (fromList [(5,"a"), (3,"b")])
    fromList [(4,"b"),(6,"a")]
    
    >>> mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(1,"c")]
    
    >>> mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(3,"c")]
    

  8. mapMaybe :: (v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Internal

    Transform this map by applying a function to every value and retaining only some of them.

  9. mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Internal

    Transform this map by applying a function to every value and retaining only some of them.

  10. mapWithKey :: (k -> v1 -> v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Internal

    Transform this map by applying a function to every value.

Page 69 of many | Previous | Next