Re: [Chicken-users] Trying to understand srfi-41 (streams)

2017-01-30 Thread Bahman Movaqar
On 01/28/2017 11:19 PM, Bahman Movaqar wrote: > I've been playing around `srfi-41` for an hour now. It seems to me, > that regardless of the operations on the stream, the `head` doesn't > advance. For example: > > (define my-stream (list->stream '(0 1 2 3))) > (take 2 my-stream) > > At

Re: [Chicken-users] Trying to understand srfi-41 (streams)

2017-01-28 Thread Vasilij Schneidermann
Hello Bahman, > And of course, upon further investigation, the head hadn't moved an inch > after `take` or `car`. What am I missing? looks to me as if the interface is purely functional. (stream-car (stream-drop 2 my-stream)) evaluates to 2. The original SRFI page shows a few examples with str

Re: [Chicken-users] Trying to understand srfi-41 (streams)

2017-01-28 Thread Peter Bex
On Sat, Jan 28, 2017 at 11:19:01PM +0100, Bahman Movaqar wrote: > I've been playing around `srfi-41` for an hour now. It seems to me, > that regardless of the operations on the stream, the `head` doesn't > advance. For example: > > (define my-stream (list->stream '(0 1 2 3))) > (take 2 m

[Chicken-users] Trying to understand srfi-41 (streams)

2017-01-28 Thread Bahman Movaqar
I've been playing around `srfi-41` for an hour now. It seems to me, that regardless of the operations on the stream, the `head` doesn't advance. For example: (define my-stream (list->stream '(0 1 2 3))) (take 2 my-stream) At this point I was expecting the stream head to have advanced by