Hoogle Search
Within LTS Haskell 24.64 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapM_ :: Monad m => (a -> m ()) -> FoldM m a ()foldl Control.Foldl Converts an effectful function to a fold. Specialized version of sink.
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.
mapMatrixWithIndex :: (Element a, Storable b) => ((Int, Int) -> a -> b) -> Matrix a -> Matrix bhmatrix 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 ]
-
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 ]
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
mapM_ :: (a -> IO b) -> InputStream a -> IO (InputStream a)io-streams System.IO.Streams.Combinators Maps a side effect over an InputStream. mapM_ f s produces a new input stream that passes all output from s through the side-effecting IO action f. Example:
ghci> Streams.fromList [1,2,3] >>= Streams.mapM_ (putStrLn . show . (*2)) >>= Streams.toList 2 4 6 [1,2,3]
mapMaybe :: (a -> Maybe b) -> InputStream a -> IO (InputStream b)io-streams System.IO.Streams.Combinators A version of map that discards elements mapMaybe f s passes all output from s through the function f and discards elements for which f s evaluates to Nothing. Example:
ghci> Streams.fromList [Just 1, None, Just 3] >>= Streams.mapMaybe id >>= Streams.toList [1,3]
Since: 1.2.1.0mapMaybe :: (a -> Maybe b) -> [a] -> [b]strict Data.Strict.Maybe Analogous to mapMaybe in Data.Maybe.
mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()mono-traversable Data.MonoTraversable.Unprefixed Synonym for omapM_
mapMaybe :: (v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2rio RIO.HashMap Transform this map by applying a function to every value and retaining only some of them.