itlist2 : ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c

SYNOPSIS
Applies a paired function between adjacent elements of 2 lists.

DESCRIPTION
itlist2 f ([x1;...;xn],[y1;...;yn]) z returns
   f x1 y1 (f x2 y2 ... (f xn yn z)...)
It returns z if both lists are empty.

FAILURE CONDITIONS
Fails if the two lists are of different lengths.

EXAMPLE
This takes a `dot product' of two vectors of integers:
  # let dot v w = itlist2 (fun x y z -> x * y + z) v w 0;;
  val dot : int list -> int list -> int = 
  # dot [1;2;3] [4;5;6];;
  val it : int = 32

SEE ALSO
itlist, rev_itlist, end_itlist, uncurry.