From f9ccaf37ec7b286fb5cfd2196c45a299204bdf27 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 25 Mar 2011 18:30:52 -0700 Subject: [PATCH] io: improve stack effects. --- core/io/io.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/io/io.factor b/core/io/io.factor index bd1bf27985..a4b93f3f82 100644 --- a/core/io/io.factor +++ b/core/io/io.factor @@ -90,10 +90,10 @@ SYMBOL: error-stream PRIVATE> -: each-stream-line ( stream quot: ( ... line -- ... ) -- ) +: each-stream-line ( ... stream quot: ( ... line -- ... ) -- ... ) swap [ stream-readln ] curry each-morsel ; inline -: each-line ( quot: ( ... line -- ... ) -- ) +: each-line ( ... quot: ( ... line -- ... ) -- ... ) input-stream get swap each-stream-line ; inline : stream-lines ( stream -- seq ) @@ -102,10 +102,10 @@ PRIVATE> : lines ( -- seq ) input-stream get stream-lines ; inline -: each-stream-block ( stream quot: ( ... block -- ... ) -- ) +: each-stream-block ( ... stream quot: ( ... block -- ... ) -- ... ) swap 65536 swap [ stream-read-partial ] 2curry each-morsel ; inline -: each-block ( quot: ( ... block -- ... ) -- ) +: each-block ( ... quot: ( ... block -- ... ) -- ... ) input-stream get swap each-stream-block ; inline : stream-contents ( stream -- seq )