<?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: Dear Java guy, State is a monad</title>
	<atom:link href="http://blog.tmorris.net/dear-java-guy-state-is-a-monad/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/</link>
	<description>The weblog of Tony Morris</description>
	<pubDate>Sat, 04 Feb 2012 12:54:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Marco Faustinelli</title>
		<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/#comment-43490</link>
		<dc:creator>Marco Faustinelli</dc:creator>
		<pubDate>Tue, 27 Jul 2010 07:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=634#comment-43490</guid>
		<description>Good morning Tony. Actually I believe me and many others would appreciate to read a specific answer to the specific question from John Nilsson. Why/when is this better than Java's language-specific state support? I already know a monad is a fluffy cloud, but generic messages like these don't actually increase my sense of urgency about learning and applying in my day job such a complex matter.
Thanks in advance and have a nice day,
Marco</description>
		<content:encoded><![CDATA[<p>Good morning Tony. Actually I believe me and many others would appreciate to read a specific answer to the specific question from John Nilsson. Why/when is this better than Java&#8217;s language-specific state support? I already know a monad is a fluffy cloud, but generic messages like these don&#8217;t actually increase my sense of urgency about learning and applying in my day job such a complex matter.<br />
Thanks in advance and have a nice day,<br />
Marco</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/#comment-36424</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Wed, 20 Jan 2010 23:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=634#comment-36424</guid>
		<description>Hello John,
I hope to partially answer that question when I get a chance in another post. Specifically, the question Why Does Monad Matter?

All I wanted to do here is witness that State (with a universally quantified type variable) is itself a monad.</description>
		<content:encoded><![CDATA[<p>Hello John,<br />
I hope to partially answer that question when I get a chance in another post. Specifically, the question Why Does Monad Matter?</p>
<p>All I wanted to do here is witness that State (with a universally quantified type variable) is itself a monad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Nilsson</title>
		<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/#comment-36423</link>
		<dc:creator>John Nilsson</dc:creator>
		<pubDate>Wed, 20 Jan 2010 23:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=634#comment-36423</guid>
		<description>I'm struggling to see _why_ to use this thing.
Honestly, if there is a reason I'd like to know.

In essence my question is, when is this better than using Javas native support for state? Like the comment in the Scala example you linked to.</description>
		<content:encoded><![CDATA[<p>I&#8217;m struggling to see _why_ to use this thing.<br />
Honestly, if there is a reason I&#8217;d like to know.</p>
<p>In essence my question is, when is this better than using Javas native support for state? Like the comment in the Scala example you linked to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/#comment-36402</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Wed, 20 Jan 2010 01:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=634#comment-36402</guid>
		<description>Hi mate,
Consider that State is a function: &lt;code&gt;S -&gt; (S, A)&lt;/code&gt;. I have given examples on here before in other languages: http://blog.tmorris.net/the-state-monad-for-scala-users/

Consider that there exists a function: &lt;code&gt;(S -&gt; S) -&gt; A -&gt; State&#60;S, A&gt;&lt;/code&gt; then think of all the possibilities for the first argument, then try to use the resulting function. e.g. suppose &lt;code&gt;+1&lt;/code&gt;, then you have a function &lt;code&gt;A -&gt; State&#60;Int, A&gt;&lt;/code&gt; which is the same as &lt;code&gt;A -&gt; Int -&gt; (Int, A)&lt;/code&gt; which is isomorphic (by curry/uncurry and flip) to &lt;code&gt;(Int, A) -&gt; (Int, A)&lt;/code&gt;.

Is this a useful function? It looks like a loop that computes values while implicitly adding the value 1 as it recurses don't you think? Try to use it for something useful.</description>
		<content:encoded><![CDATA[<p>Hi mate,<br />
Consider that State is a function: <code>S -> (S, A)</code>. I have given examples on here before in other languages: <a href="http://blog.tmorris.net/the-state-monad-for-scala-users/"  rel="nofollow">http://blog.tmorris.net/the-state-monad-for-scala-users/</a></p>
<p>Consider that there exists a function: <code>(S -> S) -> A -> State&lt;S, A></code> then think of all the possibilities for the first argument, then try to use the resulting function. e.g. suppose <code>+1</code>, then you have a function <code>A -> State&lt;Int, A></code> which is the same as <code>A -> Int -> (Int, A)</code> which is isomorphic (by curry/uncurry and flip) to <code>(Int, A) -> (Int, A)</code>.</p>
<p>Is this a useful function? It looks like a loop that computes values while implicitly adding the value 1 as it recurses don&#8217;t you think? Try to use it for something useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shaw</title>
		<link>http://blog.tmorris.net/dear-java-guy-state-is-a-monad/#comment-36389</link>
		<dc:creator>Steven Shaw</dc:creator>
		<pubDate>Tue, 19 Jan 2010 14:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=634#comment-36389</guid>
		<description>Tony, I'm struggling to see how to use this thing. Can see how the S threads through but what is a good type for S?

http://github.com/steshaw/playground/blob/master/java/state-is-a-monad/StateMonadExample.java

a Java guy</description>
		<content:encoded><![CDATA[<p>Tony, I&#8217;m struggling to see how to use this thing. Can see how the S threads through but what is a good type for S?</p>
<p><a href="http://github.com/steshaw/playground/blob/master/java/state-is-a-monad/StateMonadExample.java" onclick="javascript:pageTracker._trackPageview('/outbound/comment/github.com');" rel="nofollow">http://github.com/steshaw/playground/blob/master/java/state-is-a-monad/StateMonadExample.java</a></p>
<p>a Java guy</p>
]]></content:encoded>
	</item>
</channel>
</rss>

