1
如何输出文件中的字符到SML/NJ中的标准输入?这是我迄今为止,但我目前卡住,因为我得到的错误从编译器扔回给我。输出文件到标准输入
代码:
fun outputFile infile =
let
val ins = TextIO.openIn infile;
fun helper copt =
case copt of
NONE = TextIO.closeIn ins;
| SOME(c) = TextIO.output1(stdIn,c);
helper(TextIO.input1 ins));
in
helper ins
end;
任何想法,以我要去哪里错了吗?