unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* srfi-1 list-copy improper lists [1.6]
@ 2004-04-18  1:49 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2004-04-18  1:49 UTC (permalink / raw)


Following up on similar in the head,

        * srfi-1.scm (list-copy): New function, allowing improper lists as per
        SRFI-1 spec, which the core list-copy doesn't do.

New code:

(define (list-copy lst)
  (let ((ret (cons #f lst)))
    (do ((lst lst (cdr lst))
         (end ret (cdr end)))
        ((not (pair? lst))
         (cdr ret))
      (set-cdr! end (cons (car lst) (cdr lst))))))


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-18  1:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-18  1:49 srfi-1 list-copy improper lists [1.6] Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).