Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val args = CommandLine.arguments();
- fun print_file "-" =
- let
- val c = ref ""
- in
- while (c := TextIO.inputN (TextIO.stdIn, 1); !c <> "") do
- TextIO.output (TextIO.stdOut, !c)
- end
- | print_file f =
- let
- val f = TextIO.openIn f
- and c = ref ""
- in
- while (c := TextIO.inputN (f, 1); !c <> "") do
- TextIO.output (TextIO.stdOut, !c);
- TextIO.closeIn f
- end
- ;
- fun iter_files [] = ()
- | iter_files (x::xs) = (
- print_file x;
- (iter_files xs)
- )
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement