Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
dependent-map Data.Dependent.Map O(n*log n). mapKeysWith c f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the associated values will be combined using c.
-
dependent-map Data.Dependent.Map O(n). Map keys/values and collect the Just results.
mapWithKey :: (forall (v :: k1) . () => k2 v -> f v -> g v) -> DMap k2 f -> DMap k2 gdependent-map Data.Dependent.Map O(n). Map a function over all values in the map.
mapFst :: (a -> b) -> (a, c) -> (b, c)fgl Data.Graph.Inductive.Query.Monad No documentation available.
mapSnd :: (a -> b) -> (c, a) -> (c, b)fgl Data.Graph.Inductive.Query.Monad No documentation available.
-
ghc-boot GHC.Unit.Database Convert between GenericUnitInfo instances
mapIOException :: Exception e => (IOException -> e) -> IO a -> IO anetwork-transport Network.Transport.Internal Translate exceptions that arise in IO computations
mapToFst :: (a -> b) -> a -> (b, a)relude Relude.Extra.Tuple mapToSnd :: (a -> b) -> a -> (a, b)relude Relude.Extra.Tuple mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)relude Relude.Foldable.Reexport The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.
Examples
Basic usage:>>> mapAccumL (\a b -> (a + b, a)) 0 [1..10] (55,[0,1,3,6,10,15,21,28,36,45])
>>> mapAccumL (\a b -> (a <> show b, a)) "0" [1..5] ("012345",["0","01","012","0123","01234"])