foldl -package:base

foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a ByteString, reduces the ByteString using the binary operator, from left to right.
foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a ByteString, reduces the ByteString using the binary operator, from left to right.
foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a ShortByteString, reduces the ShortByteString using the binary operator, from left to right.
O(n) foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a Text, reduces the Text using the binary operator, from left to right.
foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a Stream, reduces the Stream using the binary operator, from left to right. Properties
foldl f z0 . stream = foldl f z0
Fold the values in the map using the given left-associative binary operator, such that foldl f z == foldl f z . elems. For example,
elems = reverse . foldl (flip (:)) []
let f len a = len + (length a)
foldl f 0 (fromList [(5,"a"), (3,"bbb")]) == 4
Fold the elements in the set using the given left-associative binary operator, such that foldl f z == foldl f z . toAscList. For example,
toDescList set = foldl (flip (:)) [] set
Fold the values in the map using the given left-associative binary operator, such that foldl f z == foldl f z . elems. For example,
elems = reverse . foldl (flip (:)) []
let f len a = len + (length a)
foldl f 0 (fromList [(5,"a"), (3,"bbb")]) == 4
Fold the elements in the set using the given left-associative binary operator, such that foldl f z == foldl f z . toAscList. For example,
toDescList set = foldl (flip (:)) [] set
O(n) Left fold.
Left fold
Left fold
O(n) Left fold.
O(n) Pure left fold.
O(n) Pure left fold.
O(n) Left fold.
O(n) Pure left fold.
O(n) Left fold.
O(n) Pure left fold.
O(n) Left fold.
O(n) Pure left fold.
Reduce this map by applying a binary operator to all elements, using the given starting value (typically the left-identity of the operator).