From 6538dfa2cfa1e40d9ce57b948c19f91a94f2dbcf Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 9 Feb 2014 03:41:13 +0900 Subject: [PATCH] cleanup --- piclib/built-in.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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)