Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

8 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages