Chris Bitmead wrote:
Is there something in Kawa like define-generic?
There is 'make-procedure' (which is documented in the manual),
and 'define-procedure' (which isn't documented but should be).
Both of these require that all the methods be supplied in the
call to 'make-procedure' or 'define-procedure'.
It should be easy enough to implement define-generic and
define-method, but I haven't.
In any case, the support for generics needs a bit of work.
The *intent* is that the following shuld work:
(define-procedure Plus
(lambda ((x :: <number>) (y :: <number>)) (+ x y))
(lambda ((x :: <string>) (y :: <string>)) (string-append x y)))
- but it doesn't. I don't know when I can get it working.