+ (* We need to reverse the order of the new created metas since they
+ are pushed on top of the metasenv in the wrong order *)
+ let highest_meta = NCicMetaSubst.maxmeta () in
+ let metasenv, subst, newhead, newheadty =
+ aux metasenv subst [] he ty_he args in
+ let metasenv_old,metasenv_new =
+ List.partition (fun (i,_) -> i <= highest_meta) metasenv
+ in
+ (List.rev metasenv_new) @ metasenv_old, subst, newhead, newheadty