Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

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

  1. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    haskell-gi-base Data.GI.Base.ShortPrelude

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

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

    regex-tdfa Data.IntMap.CharMap2

    No documentation available.

  3. mapMaybeWithKey :: (Key -> a -> Maybe b) -> CharMap a -> CharMap b

    regex-tdfa Data.IntMap.CharMap2

    No documentation available.

  4. mapMaybe :: Enum key => (a -> Maybe b) -> EnumMap key a -> EnumMap key b

    regex-tdfa Data.IntMap.EnumMap2

    No documentation available.

  5. mapMaybeWithKey :: Enum key => (key -> a -> Maybe b) -> EnumMap key a -> EnumMap key b

    regex-tdfa Data.IntMap.EnumMap2

    No documentation available.

  6. mapM_ :: Monad m => (a -> m ()) -> FoldM m a ()

    foldl Control.Foldl

    Converts an effectful function to a fold. Specialized version of sink.

  7. mapMaybe :: Ord key => key -> T (Map key elem) (Maybe elem)

    data-accessor Data.Accessor.Container

    Treats a finite map like an infinite map, where all undefined elements are Nothing and defined elements are Just.

  8. mapMatrixWithIndex :: (Element a, Storable b) => ((Int, Int) -> a -> b) -> Matrix a -> Matrix b

    hmatrix Numeric.LinearAlgebra.Devel

    >>> mapMatrixWithIndex (\(i,j) v -> 100*v + 10*fromIntegral i + fromIntegral j) (ident 3:: Matrix Double)
    (3><3)
    [ 100.0,   1.0,   2.0
    ,  10.0, 111.0,  12.0
    ,  20.0,  21.0, 122.0 ]
    

  9. mapMatrixWithIndexM :: (Element a, Storable b, Monad m) => ((Int, Int) -> a -> m b) -> Matrix a -> m (Matrix b)

    hmatrix Numeric.LinearAlgebra.Devel

    >>> mapMatrixWithIndexM (\(i,j) v -> Just $ 100*v + 10*fromIntegral i + fromIntegral j) (ident 3:: Matrix Double)
    Just (3><3)
    [ 100.0,   1.0,   2.0
    ,  10.0, 111.0,  12.0
    ,  20.0,  21.0, 122.0 ]
    

  10. mapMatrixWithIndexM_ :: (Element a, Num a, Monad m) => ((Int, Int) -> a -> m ()) -> Matrix a -> m ()

    hmatrix Numeric.LinearAlgebra.Devel

    >>> mapMatrixWithIndexM_ (\(i,j) v -> printf "m[%d,%d] = %.f\n" i j v :: IO()) ((2><3)[1 :: Double ..])
    m[0,0] = 1
    m[0,1] = 2
    m[0,2] = 3
    m[1,0] = 4
    m[1,1] = 5
    m[1,2] = 6
    

Page 24 of many | Previous | Next