;<bstyle="color:#000;background:#ffff66">affine-shift</b> <b style="color:#000;background:#66ffff">cipher</b>(define(inversexn)(letloop((x(moduloxn))(a1))(cond((zero?x)(return#f))((=x1)a)(else(let((q(-(quotientnx))))(loop(+n(*qx))(modulo(*qa)n)))))))(define(c->intc)(-(char->integerc)65))(define(int->ci)(integer->char(+i65)))(define(<bstyle="color:#000;background:#66ffff">cipher</b> a b) (lambda (x) (modulo (+ (* a x) b) 26)))(define (plain a b) (lambda (x) (modulo (* (inverse a 26) (- x b)) 26)))(define (mapping func text) (list->string (map int->c (map func (map c->int (string->list text))))))(define (encipher a b text) (mapping (<b style="color:#000;background:#66ffff">cipher</b>ab)text))(define(decipherabtext)(mapping(plainab)text))(display(encipher58"PROGRAMMINGPRAXIS"))(newline)(display(decipher58"FPAMPIQQWVMFPITWU"))(newline)