Created
October 9, 2014 17:33
-
-
Save CarstenKoenig/79103be726b657d5e3e1 to your computer and use it in GitHub Desktop.
zip two asyncs
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 zipAsync (a : Async<'a>) (b : Async<'b>) : Async<'a * 'b> = | |
async { | |
let! a' = Async.StartChild a | |
let! b' = Async.StartChild b | |
let! a'' = a' | |
let! b'' = b' | |
return (a'',b'') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment