guile-user
[Top][All Lists]
Advanced

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

Re: optimizing lazy sequences: srfi-41 vs delayed continuation with valu


From: Amirouche Boubekki
Subject: Re: optimizing lazy sequences: srfi-41 vs delayed continuation with values + promise vs delayed continuation with cons + lambda
Date: Mon, 26 Feb 2018 00:31:39 +0100
User-agent: Roundcube Webmail/1.1.2


(define (lazyseq-with-stream)
  (list->stream (iota max)))


This is wrong.

It must be implemented as:

  (define-stream (lazyseq-with-stream)
    (stream-let loop ((v 1))
     (stream-cons v (loop (+ 1 v)))))

I get the same segfault with the following error:

  Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS



reply via email to

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