let rec fold2i_exn xs ys ~init ~f =
match next xs, next ys with
| Some x, Some y ->
let init = f (count xs - 1) (count ys - 1) init x y in
(* decrease by one because of the calls to [next] *)
fold2i_exn xs ys ~init ~f
| None, None -> init
| _ -> raise Expected_streams_of_equal_length