On Mon, Dec 06, 2010 at 01:59:01PM +0100, Jörg F. Wittenberger wrote:
> Am Sonntag, den 05.12.2010, 16:15 -0700 schrieb Alan Post:
> > Should `equal?' descend into procedures, or just do an `eq?' test?
> > R5RS only requires a structural equivalence test for pairs and
> > vectors, but being able to contain (say) records is something that's
> > too handy not to have.
> > 
> > Would the language lawyers please step forward and comment?
> > 
> At least it would break some of my code, if I could not do the
> following:
> (define (a x) x)
> (define (b x) x)
> and have
> (equal? (list 'a a) (list 'a b))
> return #f
> Though this might be ruled out by RxRS, is it?

R5RS section 6.1 has this example:

(equal? (lambda (x) x)
        (lambda (y) y))          ===>  unspecified

So you're relying on something implementation dependent, whch of course
means you could have an answer other than #t or #f somewhere else.

To be clear about the problem original to this thread, I don't believe
my code was relying on either #t or #f coming out of equal? in that case.
I didn't *want* to be relying on that, anyhow.

.i ko djuno fi le do sevzi

Chicken-users mailing list

Reply via email to