Wiki Home

F# fragments

Read all input from console

open System;

let inputs = 
  fun _ -> Console.ReadLine()
  |> Seq.initInfinite
  |> Seq.takeWhile ((<>) null)
  |> List.ofSeq

Console.Write(inputs)