diff options
Diffstat (limited to 'coding-exercises/2/83.rkt')
| -rw-r--r-- | coding-exercises/2/83.rkt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coding-exercises/2/83.rkt b/coding-exercises/2/83.rkt index c6f7b68..8ea5442 100644 --- a/coding-exercises/2/83.rkt +++ b/coding-exercises/2/83.rkt @@ -277,3 +277,9 @@ (apply-and-drop 'add 1.0 (make-complex 1 0)) + +;; 86 +;; Selectors and constructors of complex numbers packages need to become generic +;; We can try to raise to real numbers before passing it to the trig functions, but we need to do this for every possible type in the system. +;; So it is better to let the types themselves define trig functions +(apply-generic 'angle (make-complex 1 test-rat)) |
