RosettaCodeData/Task/Copy-stdin-to-stdout/Standard-ML/copy-stdin-to-stdout.ml

7 lines
144 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fun copyLoop () =
case TextIO.input TextIO.stdIn of
"" => ()
| tx => copyLoop (TextIO.output (TextIO.stdOut, tx))
val () = copyLoop ()