5 lines
128 B
OCaml
5 lines
128 B
OCaml
|
|
fun foldLines f init strm =
|
||
|
|
case TextIO.inputLine strm of
|
||
|
|
SOME line => foldLines f (f (line, init)) strm
|
||
|
|
| NONE => init
|