Re: Problems with field initialization: Proposal
Michael Sperber 20 Sep 2005 10:07 UTC
Andre van Tonder <xxxxxx@later.het.brown.edu> writes:
> (define-type rational (x y)
> (let ((common (gcd x y)))
> (field-values
> (num (/ x common))
> (denom (/ y common))))
> (fields (num (rational-num))
> (denom (rational-denom))))
Could you elaborate on how the general mechanism would work? I.e. is
there a special syntax for the (let ...) stuff, or is it general
Scheme, with FIELD-VALUES being a special form?
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla