fun copy () =
(case TextIO.inputLine inf of
- "" => ()
- | line => (TextIO.output (outf, line);
+ NONE => ()
+ | SOME line => (TextIO.output (outf, line);
copy ()))
in
copy ();
val inf = TextIO.openIn fname
fun read acc =
(case TextIO.inputLine inf of
- "" => String.concat (rev acc)
- | line => read (line::acc))
+ NONE => String.concat (rev acc)
+ | SOME line => read (line::acc))
in
read []
before TextIO.closeIn inf