This commit is contained in:
Yuichi Nishiwaki 2014-02-09 03:41:13 +09:00
parent cf152e2249
commit 6538dfa2cf
1 changed files with 10 additions and 10 deletions

View File

@ -465,15 +465,6 @@
;;; 6.7 String
(define (string . objs)
(let ((len (length objs)))
(let ((v (make-string len)))
(do ((i 0 (+ i 1))
(l objs (cdr l)))
((= i len)
v)
(string-set! v i (car l))))))
(define (string->list string . opts)
(let ((start (if (pair? opts) (car opts) 0))
(end (if (>= (length opts) 2)
@ -486,7 +477,16 @@
(set! res (cons (string-ref string i) res)))))
(define (list->string list)
(apply string list))
(let ((len (length list)))
(let ((v (make-string len)))
(do ((i 0 (+ i 1))
(l list (cdr l)))
((= i len)
v)
(string-set! v i (car l))))))
(define (string . objs)
(list->string objs))
(export string string->list list->string)