Rot-13: Difference between revisions

Content added Content deleted
imported>Myrmidon
Line 3,985: Line 3,985:


val rot13 = String.map rot13char</syntaxhighlight>
val rot13 = String.map rot13char</syntaxhighlight>

Helper function:

<syntaxhighlight lang="sml">fun rot13stdin () =
case (TextIO.inputLine TextIO.stdIn)
of NONE => ()
| SOME(s) => (print (rot13 s); rot13stdin ());
</syntaxhighlight>

==={{header|mLite}}===
==={{header|mLite}}===
Reads text file from stdin to list of lines, encodes and prints lines of encoding to stdout.
Reads text file from stdin to list of lines, encodes and prints lines of encoding to stdout.