<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using OCaml&#8217;s module functors to provide monadic contexts for Batteries</title>
	<atom:link href="http://blog.mestan.fr/2009/04/24/using-ocamls-module-functors-to-provide-monadic-contexts-for-batteries/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mestan.fr/2009/04/24/using-ocamls-module-functors-to-provide-monadic-contexts-for-batteries/</link>
	<description>My programming, AI and Maths stuffs</description>
	<pubDate>Mon, 06 Feb 2012 03:12:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Alp Mestan</title>
		<link>http://blog.mestan.fr/2009/04/24/using-ocamls-module-functors-to-provide-monadic-contexts-for-batteries/#comment-1796</link>
		<dc:creator>Alp Mestan</dc:creator>
		<pubDate>Mon, 27 Apr 2009 12:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mestan.fr/?p=30#comment-1796</guid>
		<description>@Jon : here, I'm calling sequence, which takes an Enum.t of monadic elements (&lt;em&gt;[m a]&lt;/em&gt; in Haskell with Lists, 'a m Enum.t for us, where m is the monad in which we are), and returns a "monadic Enum.t". In our case, in the Option monad, if we call sequence on an enumeration containing None, it returns None, otherwise if we call it on an enumeration containing, say, Some 1, Some 3 and Some 5, it will return Some e, where e is the enumeration containing 1, 3 and 5.
Such operations are more useful in Haskell when we have a list of IO actions to do, for example.
As we only have two monads in Batteries (in my branch of Batteries, btw, not in the master one), which are Option and Enum, we can't demonstrate a pretty and handy example of sequence (neither of fold_monad, IMO).

To conclude, my code sample doesn't compute something very useful, it just shows there are some new code related to monads in Batteries, which can help for building a strong and large codebase of Monads in OCaml.

@Spiceguid : Thanks :-)</description>
		<content:encoded><![CDATA[<p>@Jon : here, I&#8217;m calling sequence, which takes an Enum.t of monadic elements (<em>[m a]</em> in Haskell with Lists, &#8216;a m Enum.t for us, where m is the monad in which we are), and returns a &#8220;monadic Enum.t&#8221;. In our case, in the Option monad, if we call sequence on an enumeration containing None, it returns None, otherwise if we call it on an enumeration containing, say, Some 1, Some 3 and Some 5, it will return Some e, where e is the enumeration containing 1, 3 and 5.<br />
Such operations are more useful in Haskell when we have a list of IO actions to do, for example.<br />
As we only have two monads in Batteries (in my branch of Batteries, btw, not in the master one), which are Option and Enum, we can&#8217;t demonstrate a pretty and handy example of sequence (neither of fold_monad, IMO).</p>
<p>To conclude, my code sample doesn&#8217;t compute something very useful, it just shows there are some new code related to monads in Batteries, which can help for building a strong and large codebase of Monads in OCaml.</p>
<p>@Spiceguid : Thanks <img src='http://blog.mestan.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SpiceGuid</title>
		<link>http://blog.mestan.fr/2009/04/24/using-ocamls-module-functors-to-provide-monadic-contexts-for-batteries/#comment-1759</link>
		<dc:creator>SpiceGuid</dc:creator>
		<pubDate>Sun, 26 Apr 2009 19:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mestan.fr/?p=30#comment-1759</guid>
		<description>That's a great initiative.
I don't care if at first it's not damn useful, someone had to start it so that the monadic style can flourish.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a great initiative.<br />
I don&#8217;t care if at first it&#8217;s not damn useful, someone had to start it so that the monadic style can flourish.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Harrop</title>
		<link>http://blog.mestan.fr/2009/04/24/using-ocamls-module-functors-to-provide-monadic-contexts-for-batteries/#comment-1654</link>
		<dc:creator>Jon Harrop</dc:creator>
		<pubDate>Fri, 24 Apr 2009 21:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mestan.fr/?p=30#comment-1654</guid>
		<description>Can you explain what your code samples do?

I am aware of only very few uses for monads in an impure language like OCaml...</description>
		<content:encoded><![CDATA[<p>Can you explain what your code samples do?</p>
<p>I am aware of only very few uses for monads in an impure language like OCaml&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

