Skip to content

Any plans to add support for Go 1.23's iterators?Β #525

@BooleanCat

Description

@BooleanCat

Hi there! You're probably aware that Go 1.23 added support for iterators to the standard library with iter.Seq. Many of the features of this library could be adapted to natively support range over functions.

I'd even be happy to work on this feature set. I main go-functional, which is exactly what I described above so many of the iterators from go-functional could be copied over with little modification to support an iter subpackage in this repo for example.

It would support beheaviour like this from go-functional:

for i := range it.Take(it.NaturalNumbers[int](), 3) {
	fmt.Println(i)
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions