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. mapMaybe :: (a -> Maybe b) -> Patricia a -> Patricia b

    radix-tree Data.Patricia.Word.Lazy

    Apply a function to every value in the tree and create one out of Just values.

  2. mapMaybe :: (a -> Maybe b) -> Patricia a -> Patricia b

    radix-tree Data.Patricia.Word.Strict

    Apply a function to every value in the tree and create one out of Just values. The Maybe is evaluated to WHNF.

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

    radix-tree Data.Radix1Tree.Word8.Lazy

    Apply a function to every value in the tree and create one out of Just values.

  4. mapMaybe :: (a -> Maybe b) -> Radix1Tree a -> Radix1Tree b

    radix-tree Data.Radix1Tree.Word8.Strict

    Apply a function to every value in the tree and create one out of Just values. The Maybe is evaluated to WHNF.

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

    radix-tree Data.RadixTree.Word8.Lazy

    Apply a function to every value in the tree and create one out of Just values.

  6. mapMaybe :: (a -> Maybe b) -> RadixTree a -> RadixTree b

    radix-tree Data.RadixTree.Word8.Strict

    Apply a function to every value in the tree and create one out of Just values. The Maybe is evaluated to WHNF.

  7. mapMaybe :: forall b a . (a -> Maybe b) -> Slist a -> Slist b

    slist Slist

    The Maybe version of map which can throw out elements. If appliying the given function returns Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    >>> maybeEven x = if even x then Just x else Nothing
    
    >>> s = cons 1 $ cons 2 $ one 3
    
    >>> mapMaybe maybeEven s
    Slist {sList = [2], sSize = Size 1}
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just s
    Slist {sList = [1,2,3], sSize = Size 3}
    

  8. mapMaybe :: forall b a . (a -> Maybe b) -> Slist a -> Slist b

    slist Slist.Maybe

    The Maybe version of map which can throw out elements. If appliying the given function returns Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    >>> maybeEven x = if even x then Just x else Nothing
    
    >>> s = cons 1 $ cons 2 $ one 3
    
    >>> mapMaybe maybeEven s
    Slist {sList = [2], sSize = Size 1}
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just s
    Slist {sList = [1,2,3], sSize = Size 3}
    

  9. mapMaybe :: forall t (m :: Type -> Type) a b . (IsStream t, Monad m) => (a -> Maybe b) -> t m a -> t m b

    streamly Streamly.Internal.Data.Stream.IsStream

    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.map fromJust . Stream.filter isJust . Stream.map f
    

  10. mapMaybe :: forall t (m :: Type -> Type) a b . (IsStream t, Monad m) => (a -> Maybe b) -> t m a -> t m b

    streamly Streamly.Prelude

    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.map fromJust . Stream.filter isJust . Stream.map f
    

Page 11 of many | Previous | Next