<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Random Hacks: Refactoring probability distributions, part 1: PerhapsT</title>
    <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Technology and Other Fun Stuff</description>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Robert</title>
      <description>&lt;p&gt;With regards to what Dan P said, there is a quantum IO monad:&lt;/p&gt;


	&lt;p&gt;http://www.cs.nott.ac.uk/~txa/talks/qnet06.pdf&lt;/p&gt;</description>
      <pubDate>Fri, 04 Apr 2008 10:37:48 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:21ae612c-60af-4f15-9c99-8491883fcf93</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-569</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Eric</title>
      <description>&lt;p&gt;The good news: You can make Data.Map a monad.&lt;/p&gt;


	&lt;p&gt;The bad news: It&amp;#8217;s &lt;a href="http://www.randomhacks.net/articles/2007/03/15/data-set-monad-haskell-macros" rel="nofollow"&gt;really ugly&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I would be delighted if this were fixed in a future version of Haskell.&lt;/p&gt;</description>
      <pubDate>Sun, 06 May 2007 19:54:12 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:c7cd218b-7f47-4edf-afb0-cf81dc4027c7</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-430</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Samer</title>
      <description>&lt;p&gt;I&amp;#8217;ve been playing around this a bit and I keep coming up against the same problem &amp;#8211; this is possibly not the right place to ask as it&amp;#8217;s more general than just probability monads, but since we&amp;#8217;re already discussing this&amp;#8230;&lt;/p&gt;


	&lt;p&gt;Anyway, the problem is that I want to declare a type constructor as an instance of some class, but to implement the class methods, I need constraints on the type argument. Eg, if I want to implement a discrete probability monad using a Data.Map to manage the distribution, I might have&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;import qualified Data.Map as Map&lt;/p&gt;

&lt;/blockquote&gt;




&lt;blockquote&gt;
	&lt;p&gt;newtype ProbMap a = PM (Map.Map a Double)&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;When I come to declare an instance of Monad, I need to use some Map functions:&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;instance Monad ProbMap where
   return x = PM (Map.singleton x 1)&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;This doesn&amp;#8217;t compile because Map requires the type of x to be an instance of Ord. But the type of x doesn&amp;#8217;t appear anywhere in the instance declaration. How can I say that ProbMap is a Monad
only for types a such that (Ord a)?&lt;/p&gt;</description>
      <pubDate>Sun, 06 May 2007 15:11:54 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:f8ba4929-b92e-4db2-b1b7-92d5daba795b</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-427</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Eric</title>
      <description>&lt;p&gt;Yeah, monad transformers are sweet, though &lt;a href="http://www.randomhacks.net/articles/2007/03/05/three-things-i-dont-understand-about-monads" rel="nofollow"&gt;they confuse me bit at times&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Dan and I have discussed a version of &lt;code&gt;WriterT&lt;/code&gt; which (a) has a more sensible name, and (b) only supports &lt;code&gt;tell&lt;/code&gt;. The rest of the &lt;code&gt;WriterT&lt;/code&gt; API is fairly pernicious in this case.&lt;/p&gt;


	&lt;p&gt;Another cool fact is that you can replace the product with (almost?) any metric space, and experiment with things like &lt;a href="http://www.survey.ntua.gr/main/labs/rsens/DeCETI/IRIT/MSI-FUSION/node93.html" rel="nofollow"&gt;possibility theory&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sun, 06 May 2007 09:32:08 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:e4d12945-0547-4f4c-8e24-19a64531e59f</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-426</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Samer</title>
      <description>&lt;p&gt;This is interesting stuff &amp;#8211; I must say monad transformers still seem a bit like magic to me! Following on from what Dan said about using WriterT, it seems you don&amp;#8217;t even need to declare a Monoid instance for probabilities &amp;#8211; you can just use the Product type from Data.Monoid. You can also parameterise by the type of probabilities and get, eg, rational probabilities for free. Remarkably, you get all of this from a
type synonym:&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;type ProbMT p = WriterT (Product p) ([])&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;(Like I said &amp;#8211; magic!) With this you can write, eg,&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;lift [1,2,3] &amp;gt;&amp;gt;= \x-&amp;gt;tell (Product (1/3))&amp;gt;&amp;gt;return x :: ProbMT Rational Int&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;to get an exact distribution by thirds over {1,2,3}. (Note that tell is used to reweight a value.)&lt;/p&gt;</description>
      <pubDate>Sun, 06 May 2007 05:12:45 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:9aff7b01-2e6a-48e0-8b0a-7b0590b11588</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-425</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Porges</title>
      <description>&lt;p&gt;I don&amp;#8217;t quite understand all the code, but this is cool :)&lt;/p&gt;


&lt;blockquote&gt;...I’m still a little bit confused about how join would work&amp;#8230;&lt;/blockquote&gt;

	&lt;p&gt;Wouldn&amp;#8217;t it be along the lines of (where P = Perhaps to make it fit better):&lt;/p&gt;


&lt;code&gt;join P (P x p1) p2 = P x (p1 * p2)&lt;/code&gt;</description>
      <pubDate>Sat, 28 Apr 2007 16:52:12 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:c3e3d9ba-114e-4876-8955-99f94cc04e2b</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-410</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Eric</title>
      <description>&lt;p&gt;&lt;i&gt;Quantum computation perhaps?&lt;/i&gt;&lt;/p&gt;


	&lt;p&gt;Very tempting. But it&amp;#8217;s pretty far down my list, and besides, I&amp;#8217;m still a little bit confused about how &lt;code&gt;join&lt;/code&gt; would work, and what to do about mixed states.&lt;/p&gt;


	&lt;p&gt;I think that this is really your area of expertise. :-)&lt;/p&gt;</description>
      <pubDate>Thu, 22 Feb 2007 00:09:54 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:0dc9e773-b858-4f4b-a507-8c6b2705e810</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-303</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Dan P</title>
      <description>&lt;blockquote&gt;
	&lt;p&gt;generalize &lt;span class="caps"&gt;PFP&lt;/span&gt; in various directions.&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;Quantum computation perhaps?&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;I suspect there’s a lot more WriterT monads lurking out there&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;Yes, so many that I think that &amp;#8216;Writer&amp;#8217; is a terrible name as that really only captures one specific use.&lt;/p&gt;</description>
      <pubDate>Wed, 21 Feb 2007 19:37:26 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9550fc29-72bb-40b8-b650-0c3466bd695d</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-300</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Eric</title>
      <description>&lt;p&gt;I had noticed the underlying monoid structure of Perhaps, but I hadn&amp;#8217;t connected it to WriterT. Thanks!&lt;/p&gt;


	&lt;p&gt;I discovered this particular monad transformer while trying to generalize &lt;span class="caps"&gt;PFP&lt;/span&gt; in various directions. There was a &lt;a href="http://en.wikipedia.org/wiki/Code_smell" rel="nofollow"&gt;nasty smell&lt;/a&gt; in my code, and this is what fell out of the refactoring.&lt;/p&gt;


	&lt;p&gt;I suspect there&amp;#8217;s a lot more WriterT monads lurking out there&amp;#8212;monoids are such a basic structure that they can&amp;#8217;t help but turn up again and again.&lt;/p&gt;</description>
      <pubDate>Wed, 21 Feb 2007 15:04:20 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b31830e2-fdb7-4a7d-9cae-f743453f3011</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-299</link>
    </item>
    <item>
      <title>"Refactoring probability distributions, part 1: PerhapsT" by Dan P</title>
      <description>&lt;p&gt;Refactorings of monads are cool and this is a really nice example.&lt;/p&gt;


	&lt;p&gt;But even cooler is when you refactor into already existing monads. I think Perhaps is simply Writer Prob and PerhapsT Prob is WriterT Prob. You need to define Prob to be a Float but with lazy multiplication so that when evaluating 0*x, 0 is returned without evaluating x. You also need to make Prob an instance of Monoid so that mappend is ordinary multiplication.&lt;/p&gt;


	&lt;p&gt;With this, I think your definition Monad (PerhapsT m) comes for free from the definition of WriterT. (At least I&amp;#8217;ve written some code to do this and it seems to work.)&lt;/p&gt;


	&lt;p&gt;Curiously I was coming at something related from a different direction. I&amp;#8217;ve been toying with writing yet another monad tutorial where monads are  considered to be a form of tainting. You can use this to &amp;#8216;quarantine&amp;#8217; code you consider tainted from clean code (in the same way the IO monad sequesters impure code). I was going to approach the Writer monad with something that looks remarkably like your Perhaps monad, ie. as a number attached to some data that gives a level of trust. But I didn&amp;#8217;t make the neat connection with probability theory that you&amp;#8217;ve just made.&lt;/p&gt;</description>
      <pubDate>Wed, 21 Feb 2007 14:26:51 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d938180a-41cb-4bee-8b94-5bf34cdfbfc5</guid>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions#comment-298</link>
    </item>
    <item>
      <title>Refactoring probability distributions, part 1: PerhapsT</title>
      <description>&lt;p&gt;(Warning: This article is a bit more technical than most of my stuff. It assumes prior knowledge of monads and monad transformers.)&lt;/p&gt;

&lt;p&gt;Martin Erwig and Steve Kollmansberger wrote &lt;a href="http://web.engr.oregonstate.edu/~erwig/pfp/"&gt;PFP&lt;/a&gt;, a really sweet Haskell library for computing with probabilities. To borrow their example:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='varid'&gt;die&lt;/span&gt; &lt;span class='keyglyph'&gt;::&lt;/span&gt; &lt;span class='conid'&gt;Dist&lt;/span&gt; &lt;span class='conid'&gt;Int&lt;/span&gt;
&lt;span class='varid'&gt;die&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;uniform&lt;/span&gt; &lt;span class='keyglyph'&gt;[&lt;/span&gt;&lt;span class='num'&gt;1&lt;/span&gt;&lt;span class='keyglyph'&gt;..&lt;/span&gt;&lt;span class='num'&gt;6&lt;/span&gt;&lt;span class='keyglyph'&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If we roll a die, we get the expected distribution of results:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&amp;gt; die
1  16.7%
2  16.7%
3  16.7%
4  16.7%
5  16.7%
6  16.7%&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you haven&amp;#8217;t seen PFP before, I strongly encourage you to &lt;a href="http://web.engr.oregonstate.edu/~erwig/pfp/"&gt;check it out&lt;/a&gt;.  You can use it to solve all sorts of probability puzzles.&lt;/p&gt;

&lt;p&gt;Anyway, I discovered an interesting way to implement PFP using &lt;a href="http://uebb.cs.tu-berlin.de/~magr/pub/Transformers.en.html"&gt;monad transformers&lt;/a&gt;.  Here&amp;#8217;s what it looks like:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='keyword'&gt;type&lt;/span&gt; &lt;span class='conid'&gt;Dist&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='conid'&gt;PerhapsT&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='keyglyph'&gt;[&lt;/span&gt;&lt;span class='keyglyph'&gt;]&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;

&lt;span class='varid'&gt;uniform&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;weighted&lt;/span&gt; &lt;span class='varop'&gt;.&lt;/span&gt; &lt;span class='varid'&gt;map&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='keyglyph'&gt;\&lt;/span&gt;&lt;span class='varid'&gt;x&lt;/span&gt; &lt;span class='keyglyph'&gt;-&amp;gt;&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='varid'&gt;x&lt;/span&gt;&lt;span class='layout'&gt;,&lt;/span&gt; &lt;span class='num'&gt;1&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In other words, &lt;code&gt;Dist&lt;/code&gt; can be written by adding some semantics to the standard list monad.&lt;/p&gt;

&lt;h3&gt;Perhaps: A less specific version of Maybe&lt;/h3&gt;

&lt;p&gt;First, let&amp;#8217;s define a simple probability type:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='keyword'&gt;newtype&lt;/span&gt; &lt;span class='conid'&gt;Prob&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='conid'&gt;P&lt;/span&gt; &lt;span class='conid'&gt;Float&lt;/span&gt;
  &lt;span class='keyword'&gt;deriving&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='conid'&gt;Eq&lt;/span&gt;&lt;span class='layout'&gt;,&lt;/span&gt; &lt;span class='conid'&gt;Ord&lt;/span&gt;&lt;span class='layout'&gt;,&lt;/span&gt; &lt;span class='conid'&gt;Num&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;

&lt;span class='keyword'&gt;instance&lt;/span&gt; &lt;span class='conid'&gt;Show&lt;/span&gt; &lt;span class='conid'&gt;Prob&lt;/span&gt; &lt;span class='keyword'&gt;where&lt;/span&gt;
  &lt;span class='varid'&gt;show&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='conid'&gt;P&lt;/span&gt; &lt;span class='varid'&gt;p&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;show&lt;/span&gt; &lt;span class='varid'&gt;intPart&lt;/span&gt; &lt;span class='varop'&gt;++&lt;/span&gt; &lt;span class='str'&gt;"."&lt;/span&gt; &lt;span class='varop'&gt;++&lt;/span&gt; &lt;span class='varid'&gt;show&lt;/span&gt; &lt;span class='varid'&gt;fracPart&lt;/span&gt; &lt;span class='varop'&gt;++&lt;/span&gt; &lt;span class='str'&gt;"%"&lt;/span&gt;
    &lt;span class='keyword'&gt;where&lt;/span&gt; &lt;span class='varid'&gt;digits&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;round&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='num'&gt;1000&lt;/span&gt; &lt;span class='varop'&gt;*&lt;/span&gt; &lt;span class='varid'&gt;p&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;
          &lt;span class='varid'&gt;intPart&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;digits&lt;/span&gt; &lt;span class='varop'&gt;`div`&lt;/span&gt; &lt;span class='num'&gt;10&lt;/span&gt;
          &lt;span class='varid'&gt;fracPart&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='varid'&gt;digits&lt;/span&gt; &lt;span class='varop'&gt;`mod`&lt;/span&gt; &lt;span class='num'&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thanks to the &lt;code&gt;deriving (Num)&lt;/code&gt; declaration, we can treat &lt;code&gt;Prob&lt;/code&gt; like any other numeric type.&lt;/p&gt;

&lt;p&gt;We can now define &lt;code&gt;Perhaps&lt;/code&gt;, which represents a value with an associated probability:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='keyword'&gt;data&lt;/span&gt; &lt;span class='conid'&gt;Perhaps&lt;/span&gt; &lt;span class='varid'&gt;a&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='conid'&gt;Perhaps&lt;/span&gt; &lt;span class='varid'&gt;a&lt;/span&gt; &lt;span class='conid'&gt;Prob&lt;/span&gt;
  &lt;span class='keyword'&gt;deriving&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='conid'&gt;Show&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, this is just a generalization of Haskell&amp;#8217;s built-in &lt;code&gt;Maybe&lt;/code&gt; type, which treats a value as either present (probability 1) or absent (probability 0). All we&amp;#8217;ve added is a range of possibilities in between: &lt;code&gt;Perhaps x 0.5&lt;/code&gt; represents a 50% chance of having a value.&lt;/p&gt;

&lt;p&gt;Note that there&amp;#8217;s one small trick here: When the probability of a value is 0, we may not actually know it!  But because Haskell is a lazy language, we can write:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='conid'&gt;Perhaps&lt;/span&gt; &lt;span class='varid'&gt;undefined&lt;/span&gt; &lt;span class='num'&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We&amp;#8217;ll need a convenient way to test for this case, to make sure we don&amp;#8217;t try to use any undefined values:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_haskell "&gt;&lt;span class='varid'&gt;neverHappens&lt;/span&gt; &lt;span class='layout'&gt;(&lt;/span&gt;&lt;span class='conid'&gt;Perhaps&lt;/span&gt; &lt;span class='keyword'&gt;_&lt;/span&gt; &lt;span class='num'&gt;0&lt;/span&gt;&lt;span class='layout'&gt;)&lt;/span&gt; &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='conid'&gt;True&lt;/span&gt;
&lt;span class='varid'&gt;neverHappens&lt;/span&gt; &lt;span class='keyword'&gt;_&lt;/span&gt;             &lt;span class='keyglyph'&gt;=&lt;/span&gt; &lt;span class='conid'&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So &lt;code&gt;Perhaps&lt;/code&gt; is just like &lt;code&gt;Maybe&lt;/code&gt;. As it turns out, they&amp;#8217;re both monads, and they both have an associated monad transformer.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions"&gt;Read More&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 21 Feb 2007 08:06:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d54b7853-2d74-4a8e-96f3-b0c0c47c4c2b</guid>
      <author>Eric Kidd</author>
      <link>http://www.randomhacks.net/articles/2007/02/21/refactoring-probability-distributions</link>
      <category>Haskell</category>
      <category>Monads</category>
      <category>Math</category>
      <category>Probability</category>
      <trackback:ping>http://www.randomhacks.net/articles/trackback/297</trackback:ping>
    </item>
  </channel>
</rss>
