From: Chris Hanson Date: Tue, 28 Feb 2017 06:14:22 +0000 (-0800) Subject: Change string-map to use string-builder. X-Git-Tag: mit-scheme-pucked-9.2.12~198^2~11 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cadf414a90968233aca832aa81cfc541d84eb655;p=mit-scheme.git Change string-map to use string-builder. --- 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)