summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bio/iter.myr22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/bio/iter.myr b/lib/bio/iter.myr
index c54b342..dbdd025 100644
--- a/lib/bio/iter.myr
+++ b/lib/bio/iter.myr
@@ -18,14 +18,11 @@ const byline = {f
impl iterable lineiter -> byte[:] =
__iternext__ = {itp, outp
match bio.readln((itp# : file#))
- | `Ok ln:
- outp# = ln
- -> true
- | `Eof:
- -> false
- | `Err _:
- -> false
+ | `Ok ln: outp# = ln
+ | `Err _: -> false
+ | `Eof: -> false
;;
+ -> true
}
__iterfin__ = {itp, outp
@@ -40,14 +37,11 @@ const bychar = {f
impl iterable chariter -> char =
__iternext__ = {itp, outp : char#
match bio.getc((itp# : file#))
- | `Ok c:
- outp# = c
- -> true
- | `Eof:
- -> false
- | `Err _:
- -> false
+ | `Ok c: outp# = c
+ | `Err _: -> false
+ | `Eof: -> false
;;
+ -> true
}
__iterfin__ = {itp, outp