[plt-scheme] Infinite?

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Thu Jul 16 09:07:01 EDT 2009

On Thu, Jul 16, 2009 at 2:00 PM, Matthew Flatt<mflatt at cs.utah.edu> wrote:
> At Thu, 16 Jul 2009 10:00:25 +0100, "Paulo J. Matos" wrote:
>> I find that the scheme languages misses infinite? which r6rs has.
>> What's the reason for this?
>
> Only that there has never been any particular demand, as far as I know.
>
>> Is it ok to define infinite? as:
>> (define (infinite? x) (or (eq? x +inf.0) (eq? x -inf.0)))
>
> Use `eqv?' instead of `eq?', and then that's right.
>
>

Some simple examples show that eq? works in some particular cases, any
cases where it wouldn't work?
Or is it just a matter of correct programming style to use eqv? over eq?.
Cheers,

-- 
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net


Posted on the users mailing list.