[Haskell-cafe] Go parallel

Andrew Coppin andrewcoppin at btinternet.com
Mon Nov 5 15:12:33 EST 2007

Hi folks.

Take a look at this:

  render :: IOArray Point Colour -> (Point -> Colour) -> IO ()
  render framebuffer fn = mapM_ (\p -> writeArray framebuffer p (fn p)) 

How do I alter this to compute fn in multiple threads in parallel? (As 
you can see from the type signature, the calculation is independent for 
each pixel.)


More information about the Haskell-Cafe mailing list