Created
September 6, 2012 10:00
-
-
Save kos59125/3654188 to your computer and use it in GitHub Desktop.
同じことを n 回繰り返す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let invoke action = action () | |
let repeat n action = Seq.initInfinite (fun _ -> action) |> Seq.take n |> Seq.iter invoke | |
let slowPrint (delay : int) = | |
fun () -> | |
System.Threading.Thread.Sleep (delay) | |
System.Console.WriteLine (System.DateTime.Now) | |
slowPrint 500 |> repeat 120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment