<div dir="ltr">Oh thank you both *^o^*... now works like a charm again.<br><blockquote>
Btw, Cetin, this is good practice, along with -funbox-strict-fields:<br><br>
data RGB = RGB !Int !Int !Int<br>
deriving Show<br><br>
Much better code than using a lazy triple.<br></blockquote>Where can I read more of such good practice? Looking forward to Real World Haskell to read lots of code, hope it'll help lots of people interested in learning haskell. (Will be released around Christmas here in Germany, I think.)<br>
<br>CS<br><br><div class="gmail_quote">2008/9/13 Don Stewart <span dir="ltr"><<a href="mailto:dons@galois.com">dons@galois.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
bertram.felgenhauer:<br>
<div class="Ih2E3d">> Cetin Sert wrote:<br>
> [snip]<br>
> > colorR :: RandomGen g $B"M(B (RGB,RGB) $B"*(B g $B"*(B (RGB,g)<br>
> > colorR ((a,b,c),(x,y,z)) s0 = ((r,g,b),s3)<br>
> > where<br>
> > (r,s1) = q (a,x) s0<br>
> > (g,s2) = q (b,y) s1<br>
> > (b,s3) = q (c,z) s2<br>
> > q = randomR<br>
><br>
> Look closely at how you use the variable 'b'.<br>
<br>
</div>:-) fast eyes.<br>
<br>
Btw, Cetin, this is good practice, along with -funbox-strict-fields:<br>
<br>
data RGB = RGB !Int !Int !Int<br>
deriving Show<br>
<br>
Much better code than using a lazy triple.<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>