Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. let expr0:Async<int> = get0...
  2. let expr1:Async<string> = get1...
  3. //please pretend that this compiles
  4. let finalFuture:Async<string> =
  5. Async.Map2 expr0 expr1 (fun (v0:int) (v1:string) -> v0 + v1 )
  6.  
  7. let final:string = Async.RunSynchronously finalFuture
  8.  
  9. let finalFuture = async {
  10. let! v0 = expr0
  11. let! v1 = expr1
  12. return v0 + v1 }
  13.  
  14. let finalFuture = async {
  15. let! v0Started = Async.StartChild(expr0)
  16. let! v1Started = Async.StartChild(expr1)
  17. let! v0 = v0Started
  18. let! v1 = v1Started
  19. return v0 + v1 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement