Hoogle Search

Within LTS Haskell 24.26 (ghc-9.10.3)

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

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

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

    errors Control.Error

    Transform the computation inside a MaybeT.

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

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

    hashtables Data.HashTable.IO

    See the documentation for this function in mapM_.

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

  6. 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_.

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

  8. mapInputT :: (forall b . () => m b -> m b) -> InputT m a -> InputT m a

    haskeline System.Console.Haskeline

    Map a user interaction by modifying the base monad computation.

  9. map_ :: Term arg result => arg -> result

    lucid Lucid.Html5

    map element

  10. mapAccumL :: (Storable a, Storable b) => (acc -> a -> (acc, b)) -> acc -> Vector a -> (acc, Vector b)

    storablevector Data.StorableVector

    The mapAccumL function behaves like a combination of map and foldl; it applies a function to each element of a Vector, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.

Page 129 of many | Previous | Next