/usr/lib/list-copy.scm is in scheme9 2013.11.26-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2012
; Placed in the Public Domain
;
; (list-copy list) ==> list
;
; Copy the spine of a proper list, creating a fresh list with the
; same elements as the original list.
;
; Example: (list-copy '(foo bar baz)) ==> (foo bar baz)
(define (list-copy a)
(let copy ((a a)
(r '()))
(if (pair? a)
(copy (cdr a)
(cons (car a) r))
(reverse! r))))
|