(define quot (lambda (n d) (if (< d 0) (- (quot n (- d))) (if (< n 0) (- (quot (- n) d)) (if (< n d) 0 (+ 1 (quot (- n d) d)))))))