/usr/lib/string-unsplit.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 19 20 21 22 23 24 25 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2010
; Placed in the Public Domain
;
; (string-unsplit char list) ==> string
;
; Unsplit a list of strings, giving a new string. CHAR is placed between
; each two elements of LIST.
;
; Example: (string-unsplit #\: '("" "a" "b" "" "c")) ==> ":a:b::c"
(define (string-unsplit c s*)
(let loop ((s* s*)
(r '())
(s0 #t))
(cond ((null? s*)
(apply string-append (reverse! r)))
(s0
(loop (cdr s*)
(cons (car s*) r)
#f))
(else
(loop (cdr s*)
(cons (car s*) (cons (string c) r))
#f)))))
|