[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in and-map and or-map? What am I doing wrong?

From: Martin Grabmueller
Subject: Re: Bug in and-map and or-map? What am I doing wrong?
Date: Tue, 08 May 2001 00:00:38 +0200

> From: Neil Jerram <address@hidden>
> Date: 07 May 2001 17:58:38 +0100
> >>>>> "Marius" == Marius Vollmer <address@hidden> writes:
>     Marius> Neil Jerram <address@hidden> writes:
>     >> (define (and-map-multilist f . lsts) (if (apply eq? (map length
>     >> lsts))
>     Marius> You want to use `=' here instead of `eq?'.  `eq?' fails on
>     Marius> bignums.  Ok, list length wont be bignums...
> `eq?' has the nice property that it works with 0 and 1 arguments.
> But so does `=', so you are right.

Hmmm, according to R5RS, `eq?' expects _exactly_ two arguments, and
`=' expects two or more arguments ...

Actually, yesterday I was quite annoyed because I had a hard-to-find
bug in one of my Scheme programs.  I somehow found out that I had
forgotten to supply the second argument to `char=' in several places.
This error would immediatly have caused an exception, if the
comparison procedures in Guile would behave in R5RS manner.  _All_
Guile comparison procedures have this problem (char{=,<,>,<=,>=}?,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]