Hi, I have a number of functions for computing raw distance measures and functions to compute their maxima for a given number of items, so to normalize them to [0,1] I provide this:
(define (normalize/distance measure maximum) (lambda (p q) (/ (measure p q) (maximum (full-domain-size p q))))) However, the maximum procedure seems unnecessary, because every measure has its own maximum. So I was wondering whether I could leave it out and instead use something like this: (define (get-maximum measure) (cond ((eq? measure footrule) footrule-maximum) ((eq? measure bogart) bogart-maximum) . . . (else (error 'get-maximum "unknown measure ~s" measure)))) both internally and for export. But if I also export it, because sometimes people might want to use the respective procedure directly, is this really safe? Will this always work, or can this somehow interfere with macros, modules, etc.? Best, Erich -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.