[Haskell-cafe] Parallel executing of actions

Stefan O'Rear stefanor at cox.net
Tue Apr 17 20:56:27 EDT 2007

On Tue, Apr 17, 2007 at 05:49:11PM -0700, Juan Carlos Arevalo Baeza wrote:
>    I may be talking out of my other end here, but... if you want something  
> like parMap to calculate all the pixels in parallel, then... can't you use  
> parMap itself?
>    Something like:
> weirdParMap action = sequence_ . map action . parMap (id $!)
>    This evaluates all the elements of the list using parMap (the expensive  
> part, right?), and then sequentially applies the action on the current  
> thread.

You are.  I'm devoting most of my brain cells to automatic deriving of
TTypeable atm, but note that id is already strict, so (id $!) is
equivalent to id. 


More information about the Haskell-Cafe mailing list