Skip to content

Instantly share code, notes, and snippets.

@bfollington
Created September 19, 2018 05:21
Show Gist options
  • Save bfollington/9a1dfc1e6cf7f93f3d854c253dbdfe46 to your computer and use it in GitHub Desktop.
Save bfollington/9a1dfc1e6cf7f93f3d854c253dbdfe46 to your computer and use it in GitHub Desktop.
[F# Read Input List]
open System
let read _ = Console.ReadLine()
let isValid = function null -> false | _ -> true
let readList t =
Seq.initInfinite read
|> Seq.takeWhile isValid
|> Seq.toList
|> List.map t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment