[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-31-g24
From: |
Ludovic Courtès |
Subject: |
Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-31-g2446f8e |
Date: |
Mon, 08 Oct 2012 13:29:00 +0200 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Hi Mark,
Please ignore my previous message, I’ve been reading them in the wrong
order. ;-)
Mark H Weaver <address@hidden> skribis:
> (not v) is not the same as (equal? #f v) when v is #nil.
[...]
> (null? v) is not the same as (equal? '() v) when v is #nil.
Ah right, I had thought about #nil, but missed those.
>> + ((or (eq? #t v)
>> + (eq? #nil v)
>> + (symbol? v)
>> + (and (integer? v)
>> + (<= v most-positive-fixnum)
>> + (>= v most-negative-fixnum)))
>> + (make-application src (make-primitive-ref #f 'eq?)
>> + (list a b)))
>
> 42.0 is an integer in the fixnum range, but (eq? 42.0 v) is not the same
> as (equal? 42.0 v).
Right, thanks!
> Also, is there any particular reason you didn't apply the same
> optimizations to 'eqv?'?
No particular reason, feel free to add it.
I was interested in ‘equal?’, because that’s what ‘match’ uses.
Thanks,
Ludo’.