I want to read N numbers (Nmax = 100) from console into a list. N is not known, but the first input that is not a number may break the reading process... However the solution should be as simple as possible, so I just read 100 lines:
let numbers = [1..100] |> List.map (fun x -> Int32.TryParse(Console.ReadLine())) |> List.filter (fun (isNum, num) -> isNum) |> List.map (fun (isNum, num) -> num)
Is there a simpler (less code) solution?