let rec fold2 f term term' accu =
match term, term' with
| RowCons (_, hd, tl), RowCons (_, hd', tl') ->
f hd hd' (f tl tl' accu)
| RowUniform content, RowUniform content' ->
f content content' accu
| App (l, r), App (l', r') ->
f r r' (f l l' accu)
| Var v, Var v' ->
f v v' accu
| _ -> failwith "fold2"