]> gitweb.factorcode.org Git - factor.git/commitdiff
io: improve signature of each-block and each-line.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 25 Mar 2011 19:20:51 +0000 (12:20 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 25 Mar 2011 19:20:51 +0000 (12:20 -0700)
core/io/io.factor

index ea37c13dd7cb00b9ad7ba4347a67ef0cd981ff00..0821cfff781e7f7d7d327218eafeeacaaba202ae 100644 (file)
@@ -90,10 +90,10 @@ SYMBOL: error-stream
 
 PRIVATE>
 
-: each-stream-line ( stream quot -- )
+: each-stream-line ( stream quot: ( ... line -- ... ) -- )
     swap [ stream-readln ] curry each-morsel ; inline
 
-: each-line ( quot -- )
+: each-line ( quot: ( ... line -- ... ) -- )
     input-stream get swap each-stream-line ; inline
 
 : stream-lines ( stream -- seq )
@@ -111,10 +111,10 @@ PRIVATE>
 : contents ( -- seq )
     input-stream get stream-contents ; inline
 
-: each-stream-block ( stream quot: ( block -- ) -- )
+: each-stream-block ( stream quot: ( ... block -- ... ) -- )
     swap [ 8192 swap stream-read-partial ] curry each-morsel ; inline
 
-: each-block ( quot: ( block -- ) -- )
+: each-block ( quot: ( ... block -- ... ) -- )
     input-stream get swap each-stream-block ; inline
 
 : stream-copy ( in out -- )