<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>
 &nbsp; &nbsp;data RGB = RGB !Int !Int !Int<br>
 &nbsp; &nbsp; &nbsp; &nbsp;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&#39;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">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</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">&gt; Cetin Sert wrote:<br>
&gt; [snip]<br>
&gt; &gt; colorR :: RandomGen g $B"M(B (RGB,RGB) $B"*(B g $B"*(B (RGB,g)<br>
&gt; &gt; colorR ((a,b,c),(x,y,z)) s0 = ((r,g,b),s3)<br>
&gt; &gt; &nbsp; where<br>
&gt; &gt; &nbsp; &nbsp; (r,s1) = q (a,x) s0<br>
&gt; &gt; &nbsp; &nbsp; (g,s2) = q (b,y) s1<br>
&gt; &gt; &nbsp; &nbsp; (b,s3) = q (c,z) s2<br>
&gt; &gt; &nbsp; &nbsp; q = randomR<br>
&gt;<br>
&gt; Look closely at how you use the variable &#39;b&#39;.<br>
<br>
</div>:-) fast eyes.<br>
<br>
Btw, Cetin, this is good practice, along with -funbox-strict-fields:<br>
<br>
 &nbsp; &nbsp;data RGB = RGB !Int !Int !Int<br>
 &nbsp; &nbsp; &nbsp; &nbsp;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>