cleanup
This commit is contained in:
parent
cf152e2249
commit
6538dfa2cf
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue