diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 41e33bce..ce3ed630 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -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)