t1 -> (t -> t1 -> t1) -> [t] -> t1
foldr, applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:
> foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)
scanr is the right-to-left dual of scanl. Note that
> head (scanr f z xs) == foldr f z xs.
Fold over the elements of a structure, associating to the right, but strictly.
flip f takes its (first) two arguments in the reverse order of f.
Consume the chunks of a lazy Text with a natural right fold.
zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two lists to produce the list of corresponding sums.
The deleteBy function behaves like delete, but takes a user-supplied equality predicate.
The non-overloaded version of insert.
Consume the chunks of a lazy Text with a strict, tail-recursive, accumulating left fold.
Lift a binary function to actions.
The deleteFirstsBy function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.
The unionBy function is the non-overloaded version of union.
Fold over the elements of a structure, associating to the left, but strictly.
foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:
> foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn
The list must be finite.
A strict version of foldl.
O(n). 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
Show more results