Suppose that we have a list [a] of computations that we want to evaluate in parallel.  I would like to have something (probably a monad) which would return the list in order (roughly) of finishing:<br><br>Say the monad is M.  It would be something like the state monad, in that it would be implemented by a state transformer function.  In this case the state would the set of computations to be evaluated.<br>
<br>we might have a function <br><br><br>include :: [a] -&gt; M a () <br><br>which would say that the monad&#39;s responsibility would be to evaluate all the members of a in parallel.  We might also have a function<br><br>
strategy :: Strategy -&gt; M a ()<br><br>which would indicate the parallel strategy to be used.<br><br>The key thing would be function, completed, which produces a list of all the computations to be evaluated as a list roughly in order of completion.<br>
<br>That is, if, inside the M monad we finished the do with<br><br>completed<br><br>then we would have a value M a [a]<br><br>which would be the list in order of completion.<br><br>Since everything is lazy we could ask for the head of the list, and it would be the first value whose computation finished.<br>
<br>Does such a thing exist?<br><br><br>Victor<br><br><br>