diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
commit | 4a48bedcd1d708a43d43dc6259a4e45c52ea3d00 (patch) | |
tree | 85c1b7310cca932797d727a3de8da96eb175d8da /066stream.mu | |
parent | ef7d834fdd826977cd8d43253052a7b8e1c5aa72 (diff) | |
download | mu-4a48bedcd1d708a43d43dc6259a4e45c52ea3d00.tar.gz |
4134 - 'input' = 'ingredient'
Diffstat (limited to '066stream.mu')
-rw-r--r-- | 066stream.mu | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/066stream.mu b/066stream.mu index 9c7824dd..6d5d0520 100644 --- a/066stream.mu +++ b/066stream.mu @@ -6,7 +6,7 @@ container stream:_elem [ def new-stream s:&:@:_elem -> result:&:stream:_elem [ local-scope - load-ingredients + load-inputs return-unless s, 0/null result <- new {(stream _elem): type} *result <- put *result, index:offset, 0 @@ -15,14 +15,14 @@ def new-stream s:&:@:_elem -> result:&:stream:_elem [ def rewind in:&:stream:_elem -> in:&:stream:_elem [ local-scope - load-ingredients + load-inputs return-unless in *in <- put *in, index:offset, 0 ] def read in:&:stream:_elem -> result:_elem, empty?:bool, in:&:stream:_elem [ local-scope - load-ingredients + load-inputs assert in, [cannot read; stream has no data] empty? <- copy 0/false idx:num <- get *in, index:offset @@ -41,7 +41,7 @@ def read in:&:stream:_elem -> result:_elem, empty?:bool, in:&:stream:_elem [ def peek in:&:stream:_elem -> result:_elem, empty?:bool [ local-scope - load-ingredients + load-inputs assert in, [cannot peek; stream has no data] empty?:bool <- copy 0/false idx:num <- get *in, index:offset @@ -58,7 +58,7 @@ def peek in:&:stream:_elem -> result:_elem, empty?:bool [ def read-line in:&:stream:char -> result:text, in:&:stream:char [ local-scope - load-ingredients + load-inputs assert in, [cannot read-line; stream has no data] idx:num <- get *in, index:offset s:text <- get *in, data:offset @@ -71,7 +71,7 @@ def read-line in:&:stream:char -> result:text, in:&:stream:char [ def end-of-stream? in:&:stream:_elem -> result:bool [ local-scope - load-ingredients + load-inputs assert in, [cannot check end-of-stream?; stream has no data] idx:num <- get *in, index:offset s:&:@:_elem <- get *in, data:offset |