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?
thanks,
daryoush
Daryoush Mehrtash <dmehrtash@gmail.com> wrote in haskell-cafe:
> I am confused about this comment:> https://github.com/rst76/probability/blob/master/src/Lawn.hs)...
> > Mostly we preferred (as do the domain experts we target) to write
> > probabilistic models in direct style rather than monadic
>
> In the haskell implementation of the lawn model there are two different
> version of the grassModel (
> By domain expert preferring direct style do you mean that they preferNo, there is no way to write probabilistic models in direct style in
> the first version over the 2nd version?
Haskell, and domain experts prefer neither Haskell version you showed.
A symptom of direct style is being able to write something like
flip 0.3 && flip 0.5
where (&&) takes two Bool arguments.
--
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
1st graffitiist: QUESTION AUTHORITY!
2nd graffitiist: Why?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe