From cadf414a90968233aca832aa81cfc541d84eb655 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 27 Feb 2017 22:14:22 -0800 Subject: [PATCH] Change string-map to use string-builder. --- src/runtime/ustring.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 1f568f9b9..4a5ebed92 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -1039,11 +1039,11 @@ USA. (define (string-map proc string . strings) (receive (n proc) (mapper-values proc string strings) - (let ((result (full-string-allocate n))) + (let ((builder (string-builder))) (do ((i 0 (fix:+ i 1))) ((not (fix:< i n))) - (%full-string-set! result i (proc i))) - result))) + (builder (proc i))) + (builder)))) (define (string-count proc string . strings) (receive (n proc) (mapper-values proc string strings) -- 2.25.1