itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
List iteration function. Applies a binary function between adjacent elements of a list.
f x1 (f x2 ... (f xn b)...)It returns b if list is empty.
Fails if some application of f fails.
- itlist (curry op+) [1,2,3,4] 0; val it = 10 : int