Hoogle Search
Within LTS Haskell 24.5 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foldlWithKey :: (a -> Key -> b -> a) -> a -> IntMap b -> acontainers Data.IntMap.Strict.Internal Fold the keys and values in the map using the given left-associative binary operator, such that foldlWithKey f z == foldl (\z' (kx, x) -> f z' kx x) z . toAscList. For example,
keys = reverse . foldlWithKey (\ks k x -> k:ks) []
let f result k a = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")" foldlWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (3:b)(5:a)"
foldlWithKey' :: (a -> Key -> b -> a) -> a -> IntMap b -> acontainers Data.IntMap.Strict.Internal A strict version of foldlWithKey. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl' :: (a -> Key -> a) -> a -> IntSet -> acontainers Data.IntSet A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl' :: (a -> Key -> a) -> a -> IntSet -> acontainers Data.IntSet.Internal A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl' :: (a -> b -> a) -> a -> Map k b -> acontainers Data.Map.Internal A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl'Stack :: (b -> k -> a -> Map k a -> b) -> b -> Stack k a -> bcontainers Data.Map.Internal No documentation available.
foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> acontainers Data.Map.Internal Fold the keys and values in the map using the given left-associative binary operator, such that foldlWithKey f z == foldl (\z' (kx, x) -> f z' kx x) z . toAscList. For example,
keys = reverse . foldlWithKey (\ks k x -> k:ks) []
let f result k a = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")" foldlWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (3:b)(5:a)"
foldlWithKey' :: (a -> k -> b -> a) -> a -> Map k b -> acontainers Data.Map.Internal A strict version of foldlWithKey. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl' :: (a -> b -> a) -> a -> Map k b -> acontainers Data.Map.Lazy A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> acontainers Data.Map.Lazy Fold the keys and values in the map using the given left-associative binary operator, such that foldlWithKey f z == foldl (\z' (kx, x) -> f z' kx x) z . toAscList. For example,
keys = reverse . foldlWithKey (\ks k x -> k:ks) []
let f result k a = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")" foldlWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (3:b)(5:a)"