RosettaCodeData/Task/Closures-Value-capture/F-Sharp/closures-value-capture-3.fs
2023-07-01 13:44:08 -04:00

5 lines
163 B
FSharp

[<EntryPoint>]
let main argv =
let fs = List.mapi (fun i x -> fun () -> i*i) (List.replicate 10 None)
do List.iter (fun f -> printfn "%d" <| f()) fs
0