Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

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

  1. mapExceptT :: (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b

    errors Control.Error

    Map the unwrapped computation using the given function.

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

    errors Control.Error

    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]
    

  3. mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b

    errors Control.Error

    Transform the computation inside a MaybeT.

  4. mapII :: (a -> b) -> I a -> I b

    generics-sop Generics.SOP

    Lift the given function.

  5. mapIII :: (a -> b -> c) -> I a -> I b -> I c

    generics-sop Generics.SOP

    Lift the given function.

  6. mapM_ :: HashTable h => ((k, v) -> ST s b) -> h s k v -> ST s ()

    hashtables Data.HashTable.Class

    A side-effecting map over the key-value records of a hash table. O(n).

  7. mapM_ :: HashTable h => ((k, v) -> IO a) -> IOHashTable h k v -> IO ()

    hashtables Data.HashTable.IO

    See the documentation for this function in mapM_.

  8. mapM_ :: ((k, v) -> ST s b) -> HashTable s k v -> ST s ()

    hashtables Data.HashTable.ST.Basic

    See the documentation for this function in mapM_.

  9. mapM_ :: ((k, v) -> ST s a) -> HashTable s k v -> ST s ()

    hashtables Data.HashTable.ST.Cuckoo

    See the documentation for this function in mapM_.

  10. mapM_ :: ((k, v) -> ST s b) -> HashTable s k v -> ST s ()

    hashtables Data.HashTable.ST.Linear

    See the documentation for this function in Data.HashTable.Class#v:mapM_.

Page 166 of many | Previous | Next