Skip to content

Instantly share code, notes, and snippets.

@veer66
Created September 6, 2016 08:55
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 veer66/d9292cdc8d8eb9648e7d7c548cffd0c6 to your computer and use it in GitHub Desktop.
Save veer66/d9292cdc8d8eb9648e7d7c548cffd0c6 to your computer and use it in GitHub Desktop.
let SplitCount (line : string) =
let toks = line.Split([|" ||| "|], System.StringSplitOptions.None)
toks.Length
let rec JustReadIt c =
match stdin.ReadLine() with
| null -> c
| line -> JustReadIt ((SplitCount line) + c)
printfn "%d\n" (JustReadIt 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment