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. mapKeys :: (Ord k2, MonoidNull v) => (k1 -> k2) -> MonoidMap k1 v -> MonoidMap k2 v

    monoidmap Data.MonoidMap

    Applies a function to all the keys of a MonoidMap that are associated with non-null values. If the resultant map would contain more than one value for the same key, values are combined together in ascending key order with the (<>) operator. Satisfies the following property for all possible keys k:

    get k (mapKeys f m) ==
    foldMap
    (`get` m)
    (filter ((==) k . f) (nonNullKeys m))
    

  2. mapKeysWith :: (Ord k2, MonoidNull v) => (v -> v -> v) -> (k1 -> k2) -> MonoidMap k1 v -> MonoidMap k2 v

    monoidmap Data.MonoidMap

    Applies a function to all the keys of a MonoidMap that are associated with non-null values, with a combining function for values. If the resultant map would contain more than one value for the same key, values are combined together in ascending key order with the given combining function. Satisfies the following property:

    mapKeysWith c f == fromListWith c . fmap (first f) . toList
    

  3. mapWithKey :: MonoidNull v2 => (k -> v1 -> v2) -> MonoidMap k v1 -> MonoidMap k v2

    monoidmap Data.MonoidMap

    Applies a key-dependent function to all non-null values of a MonoidMap. Satisfies the following properties for all functions f:

    (nonNullKey k m) ==> (get k (mapWithKey f m) == f k (get k m))
    (   nullKey k m) ==> (get k (mapWithKey f m) == mempty       )
    

  4. mapAPI :: (MapAPI a b, Applicative m) => (GQLRequest -> m GQLResponse) -> a -> m b

    morpheus-graphql-app Data.Morpheus.App

    No documentation available.

  5. mapM :: Monad m => (a -> m b) -> NonEmptyVector a -> m (NonEmptyVector b)

    nonempty-vector Data.Vector.NonEmpty

    O(n) Apply the monadic action to all elements of the non-empty vector, yielding non-empty vector of results.

    >>> mapM Just (unsafeFromList [1..3])
    Just [1,2,3]
    
    >>> mapM (const Nothing) (unsafeFromList [1..3])
    Nothing
    

  6. mapM_ :: Monad m => (a -> m b) -> NonEmptyVector a -> m ()

    nonempty-vector Data.Vector.NonEmpty

    O(n) Apply the monadic action to all elements of a non-empty vector and ignore the results.

    >>> mapM_ (const $ Just ()) (unsafeFromList [1..3])
    Just ()
    
    >>> mapM_ (const Nothing) (unsafeFromList [1..3])
    Nothing
    

  7. mapMaybe :: (a -> Maybe b) -> NonEmptyVector a -> Vector b

    nonempty-vector Data.Vector.NonEmpty

    O(n) Drop elements when predicate returns Nothing If no elements satisfy the predicate, the resulting vector may be empty.

    >>> mapMaybe (\a -> if a == 2 then Nothing else Just a) (unsafeFromList [1..3])
    [1,3]
    

  8. mapInIO :: (output -> IO newOutput) -> Parse output -> Parse newOutput

    ptr Ptr.Parse

    No documentation available.

  9. mapCategoricalPs :: (Num p, Num q) => (p -> q) -> Categorical p e -> Categorical q e

    random-fu Data.Random.Distribution.Categorical

    Like fmap, but for the probabilities of a categorical distribution.

  10. mapIO :: (a -> IO b) -> AddHandler a -> AddHandler b

    reactive-banana Control.Event.Handler

    Map the event value with an IO action.

Page 226 of many | Previous | Next