chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] srfi-40 space leak?


From: Dan
Subject: Re: [Chicken-users] srfi-40 space leak?
Date: Tue, 11 Apr 2006 07:09:34 -0700 (PDT)

> He is looping through the elements with a
> tail-recursive function.
> This should not pose any problems, since only the
> car of the list needs to be forced, after which it
> is discarded and recursion takes place on the cdr.

Thanks Peter -- that's what I meant. The SRFI-40 egg
describes itself as space-safe (by virtue of
incorporating srfi-45).

> If I understand correctly, delay and force are not
> "fixed" by SRFI-45, but
> the algorithm of converting a program to a lazy
> version of the program is
> "fixed" by requiring lazy instead of delay.

Actually, I think force and delay are both "fixed" (as
in "improved") in SRFI-45. The reference
implementation redefines force and delay and adds
"lazy" and "eager". True, the "new" force and delay
are backwards-compatible (in the absence of
lazy/eager).

The algorithm for converting to a lazy algorithm is
described in the section "Correct Usage" of SRFI-45.

-- Dan

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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