Skip to content

Instantly share code, notes, and snippets.

@MehdiK
Created May 5, 2014 18:33
Show Gist options
  • Save MehdiK/48834b287c997cef3ae2 to your computer and use it in GitHub Desktop.
Save MehdiK/48834b287c997cef3ae2 to your computer and use it in GitHub Desktop.
Reverse the Input
open System
let rec PrintReverse () =
let input = Console.ReadLine()
if input <> "END" then
PrintReverse() |> ignore
printfn "-> %s" input
PrintReverse()
Console.ReadLine() |> ignore
@MehdiK
Copy link
Author

MehdiK commented May 5, 2014

one
two
three
END
-> three
-> two
-> one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment