simonmar/async — pull request #9 by basvandijk (2013-01-16 11:30:39+00:00)
Title: Extend specification of concurrently and double its efficiency

As discussed in issue #5. I think it makes sense to extend the specification of `concurrently` by linking the two `Asyncs` together before waiting on them both.

This allows an implementation which is twice as fast by just forking one thread (instead of two) to run the right computation and running the left computation in the calling thread. When one of the computations throws an exception the exception is re-thrown to the other computation.

Note that I also inlined `concurrently'` into `race`.