(define point% (class object% (super-new) (init-field x y) (public normalize) (define (normalize) (let* ([x x] [y y] [scale (sqrt (+ (* x x) (* y y)))]) (new point% [x (/ x scale)] [y (/ y scale)]))))) (define P (send (new point% [x 1.0] [y 1.0]) normalize))