Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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