#r "nuget: Ply"
open FSharp.Control.Tasks
open System.Threading.Tasks
let unitTask = unitTask { return () }
let work =
async {
let delayTask () =
task {
printfn "Delay..."
do! Task.Delay 1000
return 42
}
let! result = delayTask () |> Async.AwaitTask
printfn "Async F# sleep..."
do! Async.Sleep 1000
return result
}
let result = work |> Async.RunSynchronously