[Haskell-cafe] Go parallel

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Nov 5 19:51:23 EST 2007


Hello Bulat,

Tuesday, November 6, 2007, 3:43:30 AM, you wrote:

> yes, that's true. but we can force evaluation of array elements:

> task (i,j) = do putArray arr (i,j) (i*j)
>                 return $! getArray arr (i,j)

correct way:

 task (i,j) = do putArray arr (i,j) $! (i*j)

this forces evaluation before writing value to array. not required for
unboxed arrays



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list