[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
srfi-1 list-copy improper lists [1.6]
From: |
Kevin Ryde |
Subject: |
srfi-1 list-copy improper lists [1.6] |
Date: |
Sun, 18 Apr 2004 11:49:02 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
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))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- srfi-1 list-copy improper lists [1.6],
Kevin Ryde <=