Last active
October 6, 2015 01:56
-
-
Save alexyakunin/da1251fe4e39f5f90fc3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
open System.Threading | |
let rec countRecursivelyAsync count = async { | |
if count <= 0 then | |
return count | |
else | |
let! result = countRecursivelyAsync(count - 1) | |
return result + 1 | |
} | |
[<EntryPoint>] | |
let main argv = | |
let result = countRecursivelyAsync 10000 |> Async.RunSynchronously | |
printfn "Counted to %d." result | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment