Improved seq call prolog term generation