[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Trying to understand srfi-41 (streams)
From: |
Bahman Movaqar |
Subject: |
Re: [Chicken-users] Trying to understand srfi-41 (streams) |
Date: |
Tue, 31 Jan 2017 00:03:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
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 this point I was expecting the stream head to have advanced by 2.
> But this fails:
>
> (assert (equal? (stream-car my-stream) 2))
Thanks Peter and Vasilij. Makes sense now.
signature.asc
Description: OpenPGP digital signature