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]

Re: Patch for append!


It may not be a bug, after all.

Whereas append! is usually defined as

(define (append! l1 l2)
  (set-cdr! (last-pair l1) l2)
  l1)

append is usually defined as

(define (append l1 l2)
  (if (null? l1) l2
       (cons (car l1)
                  (append (cdr l1) l2))))

These definitions produce the results complained of.


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