Skip to content
/ iter Public

Some basic code examples based on the current proposals for iterators and the iter package.

Notifications You must be signed in to change notification settings

Jimeux/iter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go iterators

Basic code examples based on the current proposals for iterators and the iter package.

The following packages are included, with tests demonstrating the iterator implementations:

  • bst - Binary search tree with traversal iterators
  • xiter - Functions from the iterator library proposal
  • list - Linked list with traversal iterators
  • maps - Iterators for keys and values of maps
  • secret - Iterators for a custom slice type

See the related blog post on Medium:

Run

Ensure Go 1.22 is installed.

Run tests using the rangefunc experiment flag.

$ GOEXPERIMENT=rangefunc go test ./...

About

Some basic code examples based on the current proposals for iterators and the iter package.

Topics

Resources

Stars

Watchers

Forks

Languages