From 630372114a588a45b9cbc4fb2911aa96ec37cc99 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sun, 30 Apr 2023 18:35:48 +0200 Subject: fixup --- coding-exercises/2/83.rkt | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- cgit v1.2.3