RosettaCodeData/Task/Closures-Value-capture/F-Sharp/closures-value-capture-4.fs

6 lines
156 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
[<EntryPoint>]
let main argv =
let fs = Seq.initInfinite (fun i -> fun () -> i*i)
do Seq.iter (fun f -> printfn "%d" <| f()) (Seq.take 10 fs)
0