On Nov 5, 2007 1:30 PM, Jonathan Cast <[EMAIL PROTECTED]> wrote: > > main = do > > Get two standard generators (one per dimension) > > > g0 <- newStdGen > > g1 <- newStdGen > > Get an infinite list of pairs > > > let pairs = [ (x, y) | x <- randoms (-1, 1) g0, > > y <- randoms (-1, 1) g1 ]
This will return a list like [(a,b),(a,c),(a,d),(a,e),...]. This needs to be a parallel comprehension: let pairs = [ (x,y) | x <- randoms (-1,1) g0 | y <- randoms (-1,1) g1 ] (Did I remember that syntax right?) Luke _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe