modulus



I wasn't sure what symbol you used for the infix operator; I used @ 
instead.

(C1) infix("@");
(D1)                                  "@"
(C2) "@"(a,b) := block([modulus : b], rat(a));
(D2)                 a @ b := BLOCK([MODULUS : b], RAT(a))

(C3) modulus;
(D3)                                 FALSE
(C4) (489^2281) @ 3293;
Warning: MODULUS being set to 3293, a non-prime.
(D4)/R/                              1118

Notice that modulus is still false; the assignment to modulus  in the 
block is only local.

(C5) modulus;
(D5)                                 FALSE

You'll need to be careful with binding powers of "@".   If in doubt, use 
parenthesis. 
I don't know how to eliminate the warning.

Barton