I believe the following is correct, but I don't have time to check:
a § b ::=
buildq([a,b],
block([simp:simp,modulus:modulus],
modulus: b, /* evaluate with simplifier on */
simp:false, /* otherwise general simplifier will work on a */
rat(a))) /* general simplification happens after fnc return
*/
;
Note that b gets evaluated before a, unlike normal functions.