Skip to content

Update for Go 1.22

Compare
Choose a tag to compare
@bobg bobg released this 07 Feb 15:08
· 11 commits to master since this release
0dfeb15

This release updates go-generics for Go 1.22.

It adds slices.Concat so the slices package remains a drop-in replacement for the standard-library version.

It also adds the functions iter.All, iter.AllCount, iter.AllPairs, and the types iter.Seq and iter.Seq2. These allow creating Go 1.23-style iterators from an iter.Of. A preview of Go 1.23 iterators is available in Go 1.22 by building with GOEXPERIMENT=rangefunc. When that is set, this module also defines iter.Pull and iter.Pull2. For more information about Go 1.23 iterators, see Rangefunc Experiment.