
11 Mar
2009
11 Mar
'09
5:25 a.m.
Anatoly Yakovenko wrote:
do nmergeIO or mergeIO preserve order? or not preserve order?
If you have a list of operations "[IO a]" then the future package at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/future can do this. It's 'forkPromises' function returns a "Chan a" which can be used to get the non-order preserving results (actually "Either SomeExcption a"). If you are feeling lucky you can use "getChanContents" and "filter" to get a lazy "[a]" which is the results as they are completed. -- Chris