Skip to content

Instantly share code, notes, and snippets.

@CarstenKoenig
Created October 9, 2014 17:33
Show Gist options
  • Save CarstenKoenig/79103be726b657d5e3e1 to your computer and use it in GitHub Desktop.
Save CarstenKoenig/79103be726b657d5e3e1 to your computer and use it in GitHub Desktop.
zip two asyncs
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