let rec mk_tuple = function
  | [a] -> a
  | [a; b] -> mk_cons a b
  | a :: al -> mk_cons a (mk_tuple al)
  | [] -> assert false