Skip to content

Instantly share code, notes, and snippets.

@nestalk
Created September 2, 2016 14:54
Show Gist options
  • Save nestalk/a11d1c480226e9dfec4b01dfacb03f56 to your computer and use it in GitHub Desktop.
Save nestalk/a11d1c480226e9dfec4b01dfacb03f56 to your computer and use it in GitHub Desktop.
Read input for hackerrank
open System
let rec readInput lines =
match Console.ReadLine() with
| null -> List.rev lines
| "" -> List.rev lines
| s -> readInput ((int s)::lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment