<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'Example 03 from Episode 5' | Pragmatic Forums</title>
    <link>http://fora.pragprog.com/forums/77/topics/647</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>Example 03 from Episode 5 posted by Dave Thomas @ Wed, 09 Jul 2008 13:30:27 -0000</title>
      <description>&lt;p&gt;It&amp;#8217;s a local variable, just like any other. In this case, it is scoped to the block passed to Class.new.&lt;/p&gt;


	&lt;p&gt;Dave&lt;/p&gt;</description>
      <pubDate>Wed, 09 Jul 2008 13:30:27 -0000</pubDate>
      <guid isPermaLink="false">fora.pragprog.com:77:647:3524</guid>
      <author>Dave Thomas</author>
      <link>http://fora.pragprog.com/forums/77/topics/647</link>
    </item>
    <item>
      <title>Example 03 from Episode 5 posted by kdream95 @ Wed, 09 Jul 2008 07:51:15 -0000</title>
      <description>&lt;pre&gt;
&lt;code&gt;
def memoize(parent, method)

  Class.new(parent) do
    memory = {}

    define_method(method) do |*args|
      if memory.has_key?(args)
        memory[args]
      else
        memory[args] = super
      end
    end
  end                                       
end
&lt;/code&gt;

	&lt;p&gt;Where is variable &amp;#8216;memory&amp;#8217; stored?&lt;/p&gt;</description>
      <pubDate>Wed, 09 Jul 2008 07:51:15 -0000</pubDate>
      <guid isPermaLink="false">fora.pragprog.com:77:647:3523</guid>
      <author>kdream95</author>
      <link>http://fora.pragprog.com/forums/77/topics/647</link>
    </item>
  </channel>
</rss>
