
16 Apr
2012
16 Apr
'12
10:55 p.m.
On Mon, Apr 16, 2012 at 9:04 PM, Dan Burton
Ever find yourself wanting to generate a tuple of random things? Instances are trivial to write in Haskell 98:
CC'ing the maintainer of the package as well. It looks like it makes sense to me.
instance (Random a, Random b) => Random (a, b) where randomR ((loL, loR), (hiL, hiR)) g = ((l, r), g'') where (l, g') = randomR (loL, hiL) g (r, g'') = randomR (loR, hiR) g' random g = ((l, r), g'') where (l, g') = random g (r, g'') = random g'
Can we add instances like this to System.Random in the random package?
-- Dan Burton
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries