This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in scm_map


Hi!

Try the following:

(define (foo . args) args)
(define l (iota 10))
(map foo '() l)

The result is '(), althouth an error should be reported, as R5RS states:

  If more than one list is given, then they must all be the same length.

The fix is easy:  The very first thing in scm_map is to check, whether the
first list is empty.  If so, an empty list is returned.  I will remove
that special case.

Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]