diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-04-30 18:35:48 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-04-30 18:35:48 +0200 |
| commit | 630372114a588a45b9cbc4fb2911aa96ec37cc99 (patch) | |
| tree | 39887eac420632deed1c5f8e4a7e6591f6b2fa9e | |
| parent | 17c8d272074d10be4535924171c65415f39b2731 (diff) | |
fixup
| -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)) |
