projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b80e388
)
Change string-map to use string-builder.
author
Chris Hanson
<org/chris-hanson/cph>
Tue, 28 Feb 2017 06:14:22 +0000
(22:14 -0800)
committer
Chris Hanson
<org/chris-hanson/cph>
Tue, 28 Feb 2017 06:14:22 +0000
(22:14 -0800)
src/runtime/ustring.scm
patch
|
blob
|
history
diff --git
a/src/runtime/ustring.scm
b/src/runtime/ustring.scm
index 1f568f9b94692e824a4157ddbbb372b4e337551a..4a5ebed926b7be73efdb0992b718981187a750c6 100644
(file)
--- 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)