Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
3 people like it. Like the snippet!
Create a list of int in range [init, upper).
1: 2: 3: 4: 5: 6: 7: 8: 9:
let until init upper = Seq.initInfinite (fun x -> x + init) |> Seq.takeWhile (fun x -> x < upper) |> Seq.toList // usage until 1 9 |> printfn "%A" (* #=> val it : int list = [1; 2; 3; 4; 5; 6; 7; 8] *)