summaryrefslogtreecommitdiff
path: root/chapter31/src/main/smp/sys/text.smp
diff options
context:
space:
mode:
Diffstat (limited to 'chapter31/src/main/smp/sys/text.smp')
-rw-r--r--chapter31/src/main/smp/sys/text.smp5
1 files changed, 1 insertions, 4 deletions
diff --git a/chapter31/src/main/smp/sys/text.smp b/chapter31/src/main/smp/sys/text.smp
index a28edf6d..2c4b44ff 100644
--- a/chapter31/src/main/smp/sys/text.smp
+++ b/chapter31/src/main/smp/sys/text.smp
@@ -5,10 +5,7 @@
val begin = { -> new aryu8(); };
val end = { aryu8 b ->
- val bytes = new u8[b.len];
- ary.copy(bytes,0,b.buf,0,b.len);
- u8[~] result = bytes;
- result;
+ new u8[~b.len]{ i64 i -> b.buf[i]; };
};
val _pad = { !aryu8 b, i64 n, u8 c ->