Scheme streams and Geiser
I'm working with Guile, so there's the code:
(use-moduls (srfi srfi-41))
;; It eats all my CPU with that form
;;
(define (sum-streams s1 s2)
(stream-map + s1 s2))
(define s (sum-streams primes ones)
;;
;; so I use that form
(define s (stream-map + primes ones))
(stream->list 10 s) ; (3 4 6 8 12 14 18 20 24 30)
And my Emacs is freezed when I type (define s (sum-streams primes
I think it's because Guile try to help me with what is primes, but it an infinite stream, so my Guile process eats over 100% of CPU. Can you help me with that problem?
I tried Racket as well, it doesn't freez Emacs when I'm typing stream name but it does when I want compile buffer to Geiser. (when I press C-c C-k)