I'll make this change.

At Wed, 07 Dec 2011 12:25:34 -0500, David Van Horn wrote:
> It would be nice if gcd and lcm were extended to rational numbers, which 
> seems in-line with Scheme's philosophy (but not standards) on numbers.
> 
> (define (gcd-rational . rs)
>    (/ (apply gcd (map numerator rs))
>       (apply lcm (map denominator rs))))
> 
> (define (lcm-rational . rs)
>    (/ (abs (apply * rs))
>       (apply gcd-rational rs)))
> 
> David

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to