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

    bcp47 Data.BCP47.Trie.Internal

    No documentation available.

  2. mapMaybe2 :: (a -> Maybe b) -> Trie2 a -> Maybe (Trie2 b)

    bcp47 Data.BCP47.Trie.Internal

    No documentation available.

  3. mapArray :: Ix i => (Bool -> Bool) -> IOBitArray i -> IO (IOBitArray i)

    bitwise Data.Array.BitArray.IO

    Alias for map.

  4. mapIndices :: (Ix i, Ix j) => (i, i) -> (i -> j) -> IOBitArray j -> IO (IOBitArray i)

    bitwise Data.Array.BitArray.IO

    Create a new array by reading from another.

  5. mapArray :: Ix i => (Bool -> Bool) -> STBitArray s i -> ST s (STBitArray s i)

    bitwise Data.Array.BitArray.ST

    Alias for map.

  6. mapIndices :: (Ix i, Ix j) => (i, i) -> (i -> j) -> STBitArray s j -> ST s (STBitArray s i)

    bitwise Data.Array.BitArray.ST

    Create a new array by reading from another.

  7. mapHandle :: forall (e :: Effects) (es :: Effects) . (Handle h, e :> es) => h e -> h es

    bluefin-internal Bluefin.Internal

    Used to create compound effects, i.e. handles that contain other handles.

  8. mapHandleReader :: forall (h :: Effects -> Type) (e :: Effects) (es :: Effects) . (Handle h, e :> es) => HandleReader h e -> HandleReader h es

    bluefin-internal Bluefin.Internal

    No documentation available.

  9. mapOut :: forall outa outb (f :: Type -> Type) a . (outa -> outb) -> CmdParser f outa a -> CmdParser f outb a

    butcher UI.Butcher.Monadic

    map over the out type argument

  10. mapMaybe :: (a -> Maybe b) -> [a] -> [b]

    cabal-install-solver Distribution.Solver.Compat.Prelude

    The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    Examples

    Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> let readMaybeInt = readMaybe :: String -> Maybe Int
    
    >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just [1,2,3]
    [1,2,3]
    

Page 236 of many | Previous | Next