[MLton-commit] r6004
Vesa Karvonen
vesak at mlton.org
Thu Sep 6 07:09:18 PDT 2007
Using streams to avoid intermediate list construction.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/detail/async.sml 2007-09-06 14:03:35 UTC (rev 6003)
+++ mltonlib/trunk/com/ssh/async/unstable/detail/async.sml 2007-09-06 14:09:17 UTC (rev 6004)
@@ -75,7 +75,9 @@
(Array.update (rs, i, SOME v)
; n := !n - 1
; if 0 = !n
- then done (map valOf (Array.toList rs))
+ then done (Stream.toList
+ (Stream.map
+ valOf (Stream.fromArray rs)))
else ())))
es
end
More information about the MLton-commit
mailing list