Created
May 5, 2014 18:33
-
-
Save MehdiK/48834b287c997cef3ae2 to your computer and use it in GitHub Desktop.
Reverse the Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
let rec PrintReverse () = | |
let input = Console.ReadLine() | |
if input <> "END" then | |
PrintReverse() |> ignore | |
printfn "-> %s" input | |
PrintReverse() | |
Console.ReadLine() |> ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
one
two
three
END
-> three
-> two
-> one