Re: [go-nuts] Iterators

2024-09-07 Thread vignes waran
Thanks for your wonderful explanation. On Tue, Sep 3, 2024 at 5:53 AM Ian Lance Taylor wrote: > On Mon, Sep 2, 2024 at 4:36 PM vignes waran > wrote: > > > > I have been trying to understand the concept of iterators introduced in > the new Go 1.23 release, but I’m struggling to comprehend how th

Re: [go-nuts] Iterators

2024-09-02 Thread Ian Lance Taylor
On Mon, Sep 2, 2024 at 4:36 PM vignes waran wrote: > > I have been trying to understand the concept of iterators introduced in the > new Go 1.23 release, but I’m struggling to comprehend how the iteration call > happens multiple times and where the boolean value for stopping the loop is > obtai

[go-nuts] Iterators

2024-09-02 Thread vignes waran
I have been trying to understand the concept of iterators introduced in the new Go 1.23 release, but I’m struggling to comprehend how the iteration call happens multiple times and where the boolean value for stopping the loop is obtained. Here’s my code snippet for reference: package main import