Created
February 13, 2019 14:00
-
-
Save Neftedollar/def3cd869719926fdeb49af69ef544fd 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
/// Call all specified tasks sequentially one after the other and combine the results together. | |
let seq (tasks: OrchestratorBuilder.ContextTask<'a> list) = | |
let rec work acc (rem : OrchestratorBuilder.ContextTask<'a> list) = | |
match rem with | |
| [] -> fun _ -> Task.FromResult (acc |> List.rev) | |
| d :: rest -> orchestrator { | |
let! t = d | |
return! work (t::acc) rest | |
} | |
work [] tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment