Re: [Chicken-users] Strange memory leak with lazy-seq

2015-02-24 Thread Moritz Heidkamp
Hi Alex, On 24 February 2015 00:13 CET, Alex Shinn wrote: You may be falling short of the issue described by SRFI 45, which is that in all known Scheme implementations: (define (loop) (delay (force (loop (force (loop)) leaks memory. In R7RS this becomes (define (loop)

Re: [Chicken-users] Strange memory leak with lazy-seq

2015-02-24 Thread Moritz Heidkamp
Hi John, On 24 February 2015 00:59 CET, John Cowan wrote: Lazy-map isn't lazy, so you are basically generating an eager list processing each element, and discarding the whole mess. that's not true, where did you get this idea? One way to try for yourself: (lazy-head (lazy-drop 10

Re: [Chicken-users] Strange memory leak with lazy-seq

2015-02-24 Thread cowan
Moritz Heidkamp scripsit: Lazy-map isn't lazy, so you are basically generating an eager list processing each element, and discarding the whole mess. that's not true, where did you get this idea? A brain fart on my part. I was thinking of lazy (left) folds, which have to realize all the

Re: [Chicken-users] Strange memory leak with lazy-seq

2015-02-24 Thread Alex Shinn
On Tue, Feb 24, 2015 at 7:17 PM, Moritz Heidkamp mor...@twoticketsplease.de wrote: Hi Alex, On 24 February 2015 00:13 CET, Alex Shinn wrote: You may be falling short of the issue described by SRFI 45, which is that in all known Scheme implementations: (define (loop) (delay (force