; (eea a b) yields (x . y) so that xa+yb = (gcd a b) (define (eea a b) (let ((m (modulo a b))) (if (zero? m) (cons 0 1) (let ((pr (eea b m))) (cons (cdr pr) (- (car pr) (* (cdr pr) (quotient a b))))))))