(define (make-random m a seed) (lambda (x) (cond ((eq? x 'generate) (set! seed (modulo (* seed a) m))) ((eq? x 'reset) (lambda (aaargh) (set! seed aaargh))) (else (error "RANDOM GENERATOR")))))