chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] procedure memoization


From: Nicolas Pelletier
Subject: Re: [Chicken-users] procedure memoization
Date: Thu, 18 Feb 2010 10:08:59 +0900

Hello,

On Sat, Feb 13, 2010 at 5:53 AM, Hugo Arregui <address@hidden> wrote:
>
> there's a standard implementation for procedures memoization? Srfi or egg?

R5RS says that the result of forcing a promise is memoized. So you
might want to do something along the lines of:

(let ((x (delay (begin (print "Hi!") 1)))) (print (force x)) (print (force x)))
Hi!
1
1

HTH,

-- 
Nicolas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]