Skip to content

Instantly share code, notes, and snippets.

@jasondown
Last active December 28, 2018 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasondown/332a080c894ed7561420ac6ae7b0862c to your computer and use it in GitHub Desktop.
Save jasondown/332a080c894ed7561420ac6ae7b0862c to your computer and use it in GitHub Desktop.
type Token = string array
// unit -> string
let readInput () = Console.ReadLine()
// unit -> int
let readInt = readInput >> int
// string -> string []
let tokenize (line : string) = line.Split ' '
// unit -> string []
let tokenizeInput = readInput >> tokenize
// unit -> string []
let readNLines n = Array.init n (fun _ -> readInput())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment