Re: Probability Monad

2010-01-09 Thread joel r
On Fri, Jan 8, 2010 at 2:57 PM, Konrad Hinsen wrote: > It's a bug. More specifically, a typo in a recent improvement. It is fixed > now, so please try again with the current version - or in fact go back to an > older version before December 28. Thanks! I pulled the latest clojure-contrib source,

Re: Probability Monad

2010-01-08 Thread Konrad Hinsen
On 08.01.2010, at 06:21, joel r wrote: But right now I need some help. Either I'm using dist-m wrong, or it's a bug I've found. It's a bug. More specifically, a typo in a recent improvement. It is fixed now, so please try again with the current version - or in fact go back to an older vers

Re: Probability Monad

2010-01-07 Thread joel r
Hi, I'm new to monads in clojure, and I'm loving them, they're really awesome! But right now I need some help. Either I'm using dist-m wrong, or it's a bug I've found. It can be reproduced with: clojure commit f4c58e3500b3668a0941ca21f9aa4f444de2c652 clojure-contrib commit 25fec5b5771408c30b802b

Re: Probability Monad

2009-12-28 Thread jim
I figured you'd had a good reason for doing it the way you did. Konrad Hinsen wrote: > On 24.12.2009, at 05:18, jim wrote: > > > I was looking at the probability monad today and think this definition > > of m-bind might be easier to understand. > > > > (defmonad

Re: Probability Monad

2009-12-28 Thread Konrad Hinsen
On 24.12.2009, at 05:18, jim wrote: > I was looking at the probability monad today and think this definition > of m-bind might be easier to understand. > > (defmonad dist-m > [m-result (fn m-result-dist [v] > {v 1}) > m-bind (fn m-bind-dist [mv f] >

Probability Monad

2009-12-23 Thread jim
Hey Konrad, I was looking at the probability monad today and think this definition of m-bind might be easier to understand. (defmonad dist-m [m-result (fn m-result-dist [v] {v 1}) m-bind (fn m-bind-dist [mv f] (reduce (partial merge-with