let forall_list ?pos l f =
  let l, m = 
    List.fold_right (fun x (vs, xts) ->
                       let v = variable Rigid ~name:x () in
                         v :: vs, (x, TVariable v) :: xts
                    ) l ([], []) 
  in
  fl ~pos:(pos_or_undef pos) l (f m)