[plt-scheme] Avoiding "duplicate definition for identifier" errors
Andre's method is probably the simplest. Two alternatives:
1. Use keyword arg functions, which allows you to avoid writing your
own dispatch functions
Pro: you don't have to write any dispatch code
Con: your user has to write keywords
2. Expand a define-mission-type into a macro that itself defines
appropriate keywords.
E.g.
(define-syntax define-mission-type
(syntax-rules ()
[(_ name (kwd type) ...)
(define-syntax name
(syntax-rules (kwd ...)
[(name arg ...) dispatch code here]))]))
Pro: user doesn't have to quote keywords
Con: higher-order uses do not work.
HTH,
Noel