Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. 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
    

  2. 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
    

  3. 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]
    

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

    ptr Ptr.Parse

    No documentation available.

  5. 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.

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

    reactive-banana Control.Event.Handler

    Map the event value with an IO action.

  7. mapAccum :: MonadMoment m => acc -> Event (acc -> (x, acc)) -> m (Event x, Behavior acc)

    reactive-banana Reactive.Banana.Combinators

    Efficient combination of accumE and accumB.

  8. mapEventIO :: (a -> IO b) -> Event a -> MomentIO (Event b)

    reactive-banana Reactive.Banana.Frameworks

    Build a new Event that contains the result of an IO computation. The input and result events will not be simultaneous anymore, the latter will occur later than the former. Please use the fmap for Event if your computation is pure. Implementation:

    mapEventIO f e1 = do
    (e2, handler) <- newEvent
    reactimate $ (\a -> f a >>= handler) <$> e1
    return e2
    

  9. mapAccumM :: Monad m => (a -> s -> m (b, s)) -> s -> [a] -> m ([b], s)

    reactive-banana Reactive.Banana.Prim.Mid

    mapAccum for a monad.

  10. mapAccumM_ :: Monad m => (a -> s -> m (b, s)) -> s -> [a] -> m ()

    reactive-banana Reactive.Banana.Prim.Mid

    Strict mapAccum for a monad. Discards results.

Page 225 of many | Previous | Next