<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Elegant memoization with functional memo tries</title>
	<atom:link href="http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries</link>
	<description>Inspirations &#38; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Mon, 21 Nov 2011 12:42:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions via unmemoization</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-59067</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions via unmemoization</dc:creator>
		<pubDate>Sat, 02 Oct 2010 15:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-59067</guid>
		<description>&lt;p&gt;[...] can work out an answer by appealing to the same laws of exponents used in memoization, but now applied in reverse (to create function types instead of eliminate [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] can work out an answer by appealing to the same laws of exponents used in memoization, but now applied in reverse (to create function types instead of eliminate [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Memoizing higher-order functions</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-50257</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Memoizing higher-order functions</dc:creator>
		<pubDate>Wed, 21 Jul 2010 15:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-50257</guid>
		<description>&lt;p&gt;[...] all at once from a denotational perspective, and incrementally from an operational perspective. See Elegant memoization with functional memo tries and Elegant memoization with higher-order [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] all at once from a denotational perspective, and incrementally from an operational perspective. See Elegant memoization with functional memo tries and Elegant memoization with higher-order [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Elegant memoization with higher-order types</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-50187</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Elegant memoization with higher-order types</dc:creator>
		<pubDate>Wed, 21 Jul 2010 04:48:29 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-50187</guid>
		<description>&lt;p&gt;[...] using the essential idea of Ralf Hinze&#8217;s paper Generalizing Generalized Tries. The blog post Elegant memoization with functional memo tries describes a library, MemoTrie, based on both of these sources, and using associated data types. I [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] using the essential idea of Ralf Hinze&#8217;s paper Generalizing Generalized Tries. The blog post Elegant memoization with functional memo tries describes a library, MemoTrie, based on both of these sources, and using associated data types. I [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Nonstrict memoization</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-49242</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Nonstrict memoization</dc:creator>
		<pubDate>Wed, 14 Jul 2010 02:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-49242</guid>
		<description>&lt;p&gt;[...] written a few posts about functional memoization. In one of them, Luke Palmer commented that the memoization methods are correct only for strict functions, which I [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] written a few posts about functional memoization. In one of them, Luke Palmer commented that the memoization methods are correct only for strict functions, which I [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions - part two</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-32215</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions - part two</dc:creator>
		<pubDate>Fri, 20 Nov 2009 19:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-32215</guid>
		<description>&lt;p&gt;[...] Comments conal on Elegant memoization with functional memo triesShawn Willden on Elegant memoization with functional memo triesDave Crossland on Seeking advice on [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Comments conal on Elegant memoization with functional memo triesShawn Willden on Elegant memoization with functional memo triesDave Crossland on Seeking advice on [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-31832</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Sat, 14 Nov 2009 19:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-31832</guid>
		<description>&lt;p&gt;@Shawn -- Fixed now.  Thanks for the note.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Shawn &#8212; Fixed now.  Thanks for the note.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn Willden</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-31813</link>
		<dc:creator>Shawn Willden</dc:creator>
		<pubDate>Sat, 14 Nov 2009 07:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-31813</guid>
		<description>&lt;p&gt;Your source code links are broken.  Could you please fix them so I can understand what it is you&#039;re talking about?  Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Your source code links are broken.  Could you please fix them so I can understand what it is you&#8217;re talking about?  Thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions - part one</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-22207</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Memoizing polymorphic functions - part one</dc:creator>
		<pubDate>Thu, 11 Jun 2009 00:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-22207</guid>
		<description>&lt;p&gt;[...] reuses rather than recomputes when applied to the same argument more than once. Variations include not-quite-equivalence due to added strictness, and replacing value equality with pointer [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] reuses rather than recomputes when applied to the same argument more than once. Variations include not-quite-equivalence due to added strictness, and replacing value equality with pointer [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Simpler, more efficient, functional linear maps</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-11163</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Simpler, more efficient, functional linear maps</dc:creator>
		<pubDate>Sun, 09 Nov 2008 22:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-11163</guid>
		<description>&lt;p&gt;[...] However, there are several other ways to make linear maps, and it would be easy to forget to memoize each combining form. So, instead of the function representation above, I ensure that the function be memoized by representing it as a memo trie. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] However, there are several other ways to make linear maps, and it would be easy to forget to memoize each combining form. So, instead of the function representation above, I ensure that the function be memoized by representing it as a memo trie. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Vector space bases via type families</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10304</link>
		<dc:creator>Conal Elliott &#187; Blog Archive &#187; Vector space bases via type families</dc:creator>
		<pubDate>Mon, 20 Oct 2008 01:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10304</guid>
		<description>&lt;p&gt;[...] rules are also essentially the same as the ones used for memo tries, but phrased in terms of logarithms instead of (explicit) exponents.    Tags: type families, vector [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] rules are also essentially the same as the ones used for memo tries, but phrased in terms of logarithms instead of (explicit) exponents.    Tags: type families, vector [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10190</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Thu, 16 Oct 2008 23:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10190</guid>
		<description>&lt;p&gt;I said to &lt;a href=&quot;http://luqui.org/blog&quot; rel=&quot;nofollow&quot;&gt;Luke&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
I&#039;d love to read a blog post about your library, especially where you exploit the flexibility of explicit memoizers.
&lt;/blockquote&gt;

&lt;p&gt;Oh!  Now I see that you &lt;a href=&quot;http://luqui.org/blog/archives/2008/10/14/data-memocombinators/&quot; rel=&quot;nofollow&quot;&gt;have written&lt;/a&gt;.  I&#039;d still like to see some nice examples if you get around to it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I said to <a href="http://luqui.org/blog" rel="nofollow">Luke</a></p>

<blockquote>
I&#8217;d love to read a blog post about your library, especially where you exploit the flexibility of explicit memoizers.
</blockquote>

<p>Oh!  Now I see that you <a href="http://luqui.org/blog/archives/2008/10/14/data-memocombinators/" rel="nofollow">have written</a>.  I&#8217;d still like to see some nice examples if you get around to it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Menendez</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10187</link>
		<dc:creator>Dave Menendez</dc:creator>
		<pubDate>Thu, 16 Oct 2008 21:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10187</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;Any thoughts on this dilemma?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, there&#039;s not much point memoizing a constant function. Also, a strict instance for () is more consistent with the other instances.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>Any thoughts on this dilemma?</p>
</blockquote>

<p>Well, there&#8217;s not much point memoizing a constant function. Also, a strict instance for () is more consistent with the other instances.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10183</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Thu, 16 Oct 2008 17:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10183</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;[...] I don&#039;t think the typeclass approach to memoization is a good one. Here you are limited to one memo trie per type. But there are many ways to memoize a given type!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yep.  A problem with typeclasses in general.  Even more generally, a problem with hiding implementation mechanism.  Prettier but less flexible.  I gather you&#039;ve found the flexibility particularly useful with memoization.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;data-memocombinators, which I just released on hackage two days ago [...]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sounds awfully cool.  I&#039;d love to read a blog post about your library, especially where you exploit the flexibility of explicit memoizers.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>[...] I don&#8217;t think the typeclass approach to memoization is a good one. Here you are limited to one memo trie per type. But there are many ways to memoize a given type!</p>
</blockquote>

<p>Yep.  A problem with typeclasses in general.  Even more generally, a problem with hiding implementation mechanism.  Prettier but less flexible.  I gather you&#8217;ve found the flexibility particularly useful with memoization.</p>

<blockquote>
  <p>data-memocombinators, which I just released on hackage two days ago [...]</p>
</blockquote>

<p>Sounds awfully cool.  I&#8217;d love to read a blog post about your library, especially where you exploit the flexibility of explicit memoizers.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10182</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Thu, 16 Oct 2008 17:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10182</guid>
		<description>&lt;blockquote&gt;
Memoization changes the strictness of functions.
&lt;/blockquote&gt;

&lt;p&gt;Yow!  It sure does.  :(&lt;/p&gt;

&lt;blockquote&gt;
this one is not essential, but rather a bug, I think.
&lt;/blockquote&gt;

&lt;p&gt;Oh, I see the problem:&lt;/p&gt;

&lt;p&gt;&lt;div&gt;
&lt;pre class=&quot;haskell&quot;&gt;&gt; &lt;span style=&quot;color: #050; font-weight: bold;&quot;&gt;let&lt;/span&gt; f &lt;span style=&quot;color: green;&quot;&gt;&#040;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&#041;&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt;
&gt; &lt;span style=&quot;color: green;&quot;&gt;&#040;&lt;/span&gt;\ &lt;span style=&quot;color: green;&quot;&gt;&#040;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&#041;&lt;/span&gt; -&gt; &lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&#041;&lt;/span&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt; 
*** Exception: &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;colo: #050; font-weight: bold;&quot;&gt;Prelude&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt;
&gt; &lt;span style=&quot;color: green;&quot;&gt;&#040;&lt;/span&gt;&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:const&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;const&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&#041;&lt;/span&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt; 
&lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Hmm.  I can fix the &lt;code&gt;f&lt;/code&gt; case by changing the nonstrict &lt;code&gt;const a&lt;/code&gt; to the strict &lt;code&gt;\ () -&gt; a&lt;/code&gt; in the definition of &lt;code&gt;untrie (UnitTrie a)&lt;/code&gt;.  But then I run into the dual problem:&lt;/p&gt;

&lt;p&gt;&lt;div&gt;
&lt;pre class=&quot;haskell&quot;&gt;&gt; &lt;span style=&quot;color: #050; font-weight: bold;&quot;&gt;let&lt;/span&gt; g = &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:const&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;const&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt; :: &lt;span style=&quot;color: green;&quot;&gt;&#040;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&#041;&lt;/span&gt; -&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Int&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;color: #833; font-weight: bold;&quot;&gt;Int&lt;/span&gt;&lt;/a&gt;
&gt; g &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt;
&lt;span style=&quot;color: red;&quot;&gt;42&lt;/span&gt;
&gt; memo g &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt;
*** Exception: &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;colo: #050; font-weight: bold;&quot;&gt;Prelude&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;undefined&lt;/span&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Any thoughts on this dilemma?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
Memoization changes the strictness of functions.
</blockquote>

<p>Yow!  It sure does.  <img src='http://conal.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>

<blockquote>
this one is not essential, but rather a bug, I think.
</blockquote>

<p>Oh, I see the problem:</p>

<p><div>
<pre class="haskell">&gt; <span style="color: #050; font-weight: bold;">let</span> f <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span> = <span style="color: red;">42</span>
&gt; <span style="color: green;">&#40;</span>\ <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span> -&gt; <span style="color: red;">42</span><span style="color: green;">&#41;</span> <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a> 
*** Exception: <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html" rel="nofollow"><span style="colo: #050; font-weight: bold;">Prelude</span></a>.<a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a>
&gt; <span style="color: green;">&#40;</span><a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:const" rel="nofollow"><span style="font-weight: bold;">const</span></a> <span style="color: red;">42</span><span style="color: green;">&#41;</span> <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a> 
<span style="color: red;">42</span></pre>
</div></p>

<p>Hmm.  I can fix the <code>f</code> case by changing the nonstrict <code>const a</code> to the strict <code>\ () -&gt; a</code> in the definition of <code>untrie (UnitTrie a)</code>.  But then I run into the dual problem:</p>

<p><div>
<pre class="haskell">&gt; <span style="color: #050; font-weight: bold;">let</span> g = <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:const" rel="nofollow"><span style="font-weight: bold;">const</span></a> <span style="color: red;">42</span> :: <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span> -&gt; <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Int" rel="nofollow"><span style="color: #833; font-weight: bold;">Int</span></a>
&gt; g <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a>
<span style="color: red;">42</span>
&gt; memo g <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a>
*** Exception: <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html" rel="nofollow"><span style="colo: #050; font-weight: bold;">Prelude</span></a>.<a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:undefined" rel="nofollow"><span style="font-weight: bold;">undefined</span></a></pre>
</div></p>

<p>Any thoughts on this dilemma?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Palmer</title>
		<link>http://conal.net/blog/posts/elegant-memoization-with-functional-memo-tries/comment-page-1#comment-10166</link>
		<dc:creator>Luke Palmer</dc:creator>
		<pubDate>Thu, 16 Oct 2008 08:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=54#comment-10166</guid>
		<description>&lt;p&gt;Oh, your semantics are not quite right.  Memoization changes the strictness of functions.&lt;/p&gt;

&lt;pre&gt;
    take 5 (repeat True)        = [True,True,True,True,True]
    memo (take 5) (repeat True) = &#8869;
    
    -- this one is not essential, but rather a bug, I think.
    let f () = 42
    f &#8869;      = &#8869;
    memo f &#8869; = 42
&lt;/pre&gt;

&lt;p&gt;I am not quite sure in what essential way the strictness is changed.  For example, it is theoretically possible to memoize a function of infinite streams, given that the return type is compact, so it&#039;s not just that it makes it fully strict in its argument&#039;s domain.  I haven&#039;t gotten around to implementing this awesome possibility just yet :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oh, your semantics are not quite right.  Memoization changes the strictness of functions.</p>

<pre>
    take 5 (repeat True)        = [True,True,True,True,True]
    memo (take 5) (repeat True) = &perp;
    
    -- this one is not essential, but rather a bug, I think.
    let f () = 42
    f &perp;      = &perp;
    memo f &perp; = 42
</pre>

<p>I am not quite sure in what essential way the strictness is changed.  For example, it is theoretically possible to memoize a function of infinite streams, given that the return type is compact, so it&#8217;s not just that it makes it fully strict in its argument&#8217;s domain.  I haven&#8217;t gotten around to implementing this awesome possibility just yet <img src='http://conal.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
</channel>
</rss>

