Created
September 19, 2018 05:21
-
-
Save bfollington/9a1dfc1e6cf7f93f3d854c253dbdfe46 to your computer and use it in GitHub Desktop.
[F# Read Input List]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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