I see the problem now. But I am confused as to why there are no Bool class (like Num, Fractional...) in Haskell. If I had such a class then the problem is solved, (by making the "pm a" an instance of it) right? Or are there still more issues that I am not seeing?<br>
<br>thanks,<br><br>daryoush<br><br><div class="gmail_quote">On Mon, Feb 28, 2011 at 7:34 AM, Chung-chieh Shan <span dir="ltr"><<a href="mailto:ccshan@cs.rutgers.edu">ccshan@cs.rutgers.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Daryoush Mehrtash <<a href="mailto:dmehrtash@gmail.com">dmehrtash@gmail.com</a>> wrote in haskell-cafe:<br>
</div><div class="im">> I am confused about this comment:<br>
> > Mostly we preferred (as do the domain experts we target) to write<br>
> > probabilistic models in direct style rather than monadic<br>
><br>
> In the haskell implementation of the lawn model there are two different<br>
> version of the grassModel (<br>
</div>> <a href="https://github.com/rst76/probability/blob/master/src/Lawn.hs%29." target="_blank">https://github.com/rst76/probability/blob/master/src/Lawn.hs).</a>..<br>
<div class="im">> By domain expert preferring direct style do you mean that they prefer<br>
> the first version over the 2nd version?<br>
<br>
</div>No, there is no way to write probabilistic models in direct style in<br>
Haskell, and domain experts prefer neither Haskell version you showed.<br>
<br>
A symptom of direct style is being able to write something like<br>
<br>
flip 0.3 && flip 0.5<br>
<br>
where (&&) takes two Bool arguments.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Edit this signature at <a href="http://www.digitas.harvard.edu/cgi-bin/ken/sig%0A1st" target="_blank">http://www.digitas.harvard.edu/cgi-bin/ken/sig<br>
1st</a> graffitiist: QUESTION AUTHORITY!<br>
2nd graffitiist: Why?<br>
<br>
<br>
_______________________________________________<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><br clear="all"><br>-- <br>Daryoush<br><br>Weblog: <a href="http://onfp.blogspot.com/" target="_blank">http://onfp.blogspot.com/</a><br>