Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (11 sloc) 322 Bytes
(define (make-from-mag-ang r a)
(define (dispatch op)
(cond ((eq? op 'real-part)
(* r (cos a)))
((eq? op 'image-part)
(* r (sin a)))
((eq? op 'magnitude) r)
((eq? op 'angle) a)
(else
(error "Unknown op -- MAKE-FROM-MAG-ANG" op))))
dispatch)