Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

  1. map_fst_zip_take :: IO Proof

    sbv Documentation.SBV.Examples.KnuckleDragger.Lists

    map fst (zip xs ys) = take (min (length xs) (length ys)) xs
    
    >>> map_fst_zip_take
    Lemma: take_cons                        Q.E.D.
    Inductive lemma: map_fst_zip_take
    Step: Base                            Q.E.D.
    Step: 1                               Q.E.D.
    Step: 2                               Q.E.D.
    Step: 3                               Q.E.D.
    Step: 4                               Q.E.D.
    Step: 5                               Q.E.D.
    Result:                               Q.E.D.
    [Proven] map_fst_zip_take
    

  2. map_snd_zip :: IO Proof

    sbv Documentation.SBV.Examples.KnuckleDragger.Lists

    length xs = length ys ⟹ map snd (zip xs ys) = xs
    
    >>> map_snd_zip
    Inductive lemma: map_snd_zip
    Step: Base                            Q.E.D.
    Step: 1                               Q.E.D.
    Step: 2                               Q.E.D.
    Step: 3                               Q.E.D.
    Step: 4                               Q.E.D.
    Result:                               Q.E.D.
    [Proven] map_snd_zip
    

  3. map_snd_zip_take :: IO Proof

    sbv Documentation.SBV.Examples.KnuckleDragger.Lists

    map snd (zip xs ys) = take (min (length xs) (length ys)) xs
    
    >>> map_snd_zip_take
    Lemma: take_cons                        Q.E.D.
    Inductive lemma: map_snd_zip_take
    Step: Base                            Q.E.D.
    Step: 1                               Q.E.D.
    Step: 2                               Q.E.D.
    Step: 3                               Q.E.D.
    Step: 4                               Q.E.D.
    Step: 5                               Q.E.D.
    Result:                               Q.E.D.
    [Proven] map_snd_zip_take
    

  4. mapM :: Monad m => (b -> m c) -> Fold m a b -> Fold m a c

    streamly-core Streamly.Data.Fold

    Deprecated: Use rmapM instead

  5. mapMaybe :: forall (m :: Type -> Type) a b r . Monad m => (a -> Maybe b) -> Fold m b r -> Fold m a r

    streamly-core Streamly.Data.Fold

    mapMaybe f fold maps a Maybe returning function f on the input of the fold, filters out Nothing elements, and return the values extracted from Just.

    >>> mapMaybe f = Fold.lmap f . Fold.catMaybes
    
    >>> mapMaybe f = Fold.mapMaybeM (return . f)
    
    >>> f x = if even x then Just x else Nothing
    
    >>> fld = Fold.mapMaybe f Fold.toList
    
    >>> Stream.fold fld (Stream.enumerateFromTo 1 10)
    [2,4,6,8,10]
    

  6. mapM :: Monad m => (a -> m b) -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    >>> mapM f = Stream.sequence . fmap f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> s = Stream.fromList ["a", "b", "c"]
    
    >>> Stream.fold Fold.drain $ Stream.mapM putStr s
    abc
    

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

    streamly-core Streamly.Data.Stream

    Map a Maybe returning function to a stream, filter out the Nothing elements, and return a stream of values extracted from Just. Equivalent to:

    >>> mapMaybe f = Stream.catMaybes . fmap f
    

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

    streamly-core Streamly.Data.Stream

    Like mapMaybe but maps a monadic function. Equivalent to:

    >>> mapMaybeM f = Stream.catMaybes . Stream.mapM f
    
    >>> mapM f = Stream.mapMaybeM (\x -> Just <$> f x)
    

  9. mapM :: Monad m => (a -> m b) -> StreamK m a -> StreamK m b

    streamly-core Streamly.Data.StreamK

    No documentation available.

  10. mapM :: Monad m => (b -> m c) -> Unfold m a b -> Unfold m a c

    streamly-core Streamly.Data.Unfold

    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.

    >>> mapM f = Unfold.mapM2 (const f)
    

Page 259 of many | Previous | Next