From: Rob Rypka Date: 2005-09-25T00:27:01+09:00 Subject: Re: "once" methods ------=_Part_19214_31744150.1127575604797 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/24/05, James Edward Gray II wrote: > > On Sep 24, 2005, at 12:57 AM, Steven Arnold wrote: > > > Hi, > > > > I was reading PickAxe and came across the very cool concept of > > "once" methods, which are methods that only evaluate when first > > called, returning a cached value for subsequent calls. > > This is usually called memoization, but I'm not aware of a standard > library that handles it. > http://raa.ruby-lang.org/project/memoize/ I havent yet tried it out, but if this doesn't work, it's not too hard to implement. -- Rob ------=_Part_19214_31744150.1127575604797--