Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

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

  1. mapMaybeWithKey :: (k -> a -> Maybe b) -> NEMap k a -> Map k b

    nonempty-containers Data.Map.NonEmpty

    O(n). Map keys/values and collect the Just results. Returns a potentially empty map (Map), because the function could potentially return Nothing on all items in the NEMap.

    let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
    mapMaybeWithKey f (fromList ((5,"a") :| [(3,"b")])) == Data.Map.singleton 3 "key : 3"
    

  2. mapMonotonic :: (a -> b) -> NESet a -> NESet b

    nonempty-containers Data.Set.NonEmpty

    O(n). mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:

    and [x < y ==> f x < f y | x <- ls, y <- ls]
    ==> mapMonotonic f s == map f s
    where ls = Data.Foldable.toList s
    

  3. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    prelude-compat Prelude2010

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

  4. mapM_ :: Monad m => (a -> m b) -> Vector a -> m ()

    rebase Rebase.Data.Vector

    No documentation available.

  5. mapMaybe :: (a -> Maybe b) -> Vector a -> Vector b

    rebase Rebase.Data.Vector

    No documentation available.

  6. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Vector a -> m (Vector b)

    rebase Rebase.Data.Vector

    No documentation available.

  7. mapM_ :: Monad m => (a -> m b) -> Stream m a -> m ()

    rebase Rebase.Data.Vector.Fusion.Stream.Monadic

    Execute a monadic action for each element of the Stream

  8. mapMaybe :: forall (m :: Type -> Type) a b . Monad m => (a -> Maybe b) -> Stream m a -> Stream m b

    rebase Rebase.Data.Vector.Fusion.Stream.Monadic

    No documentation available.

  9. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Stream m a -> Stream m b

    rebase Rebase.Data.Vector.Fusion.Stream.Monadic

    Apply monadic function to each element and drop all Nothings

  10. mapM_ :: (Monad m, Vector v a) => (a -> m b) -> v a -> m ()

    rebase Rebase.Data.Vector.Generic

    No documentation available.

Page 41 of many | Previous | Next