diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-07-27 22:20:12 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-07-27 22:20:12 -0700 |
commit | 814333e288a75af10fc39b8ca8d8eefcb855fb25 (patch) | |
tree | 78eb882cdd87437af70f5dabef9227ea41417800 /066stream.mu | |
parent | b462361dbedb1ebaa76fdeddacca562e9d86a956 (diff) | |
download | mu-814333e288a75af10fc39b8ca8d8eefcb855fb25.tar.gz |
3155
Diffstat (limited to '066stream.mu')
-rw-r--r-- | 066stream.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/066stream.mu b/066stream.mu index ce0b1788..75685fd0 100644 --- a/066stream.mu +++ b/066stream.mu @@ -25,7 +25,7 @@ def read in:address:stream -> result:character, in:address:stream [ s:address:array:character <- get *in, data:offset len:number <- length *s at-end?:boolean <- greater-or-equal idx len - reply-if at-end?, 0/nul, in + return-if at-end?, 0/nul, in result <- index *s, idx idx <- add idx, 1 *in <- put *in, index:offset, idx @@ -38,7 +38,7 @@ def peek in:address:stream -> result:character [ s:address:array:character <- get *in, data:offset len:number <- length *s at-end?:boolean <- greater-or-equal idx len - reply-if at-end?, 0/nul + return-if at-end?, 0/nul result <- index *s, idx ] |