\DOC itlist \TYPE {itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b} \SYNOPSIS List iteration function. Applies a binary function between adjacent elements of a list. \KEYWORDS list. \DESCRIBE {itlist f [x1,...,xn] b} returns { f x1 (f x2 ... (f xn b)...) } An invocation {itlist f list b} returns {b} if {list} is empty. \FAILURE Fails if some application of {f} fails. \EXAMPLE { - itlist (curry op+) [1,2,3,4] 0; val it = 10 : int } \SEEALSO Lib.itlist2, Lib.rev_itlist, Lib.rev_itlist2, Lib.end_itlist. \ENDDOC