Skip to content
/ iterz Public

Extends the standard package iter for working with iterators.

License

Notifications You must be signed in to change notification settings

ezpkg/iterz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopherz

ezpkg.io/iterz

PkgGoDev GitHub License version

Package iterz extends the standard library iter with additional functions.

Installation

go get -u ezpkg.io/iterz@v0.2.2

Features

Currently, it provides the following functions:

  • Nil[V]() iter.Seq[V]: returns an iterator that yields nothing.
  • Nil2[K, V]() iter.Seq2[K, V]: returns an iterator that yields nothing.
// Nil return an iter.Seq that yields nothing.
func Nil[V any]() iter.Seq[V] {
	return func(yield func(V) bool) {}
}

// Nil2 return an iter.Seq2 that yields nothing.
func Nil2[K, V any]() iter.Seq2[K, V] {
	return func(yield func(K, V) bool) {}
}

About ezpkg.io

As I work on various Go projects, I often find myself creating utility functions, extending existing packages, or developing packages to solve specific problems. Moving from one project to another, I usually have to copy or rewrite these solutions. So I created this repository to have all these utilities and packages in one place. Hopefully, you'll find them useful as well.

For more information, see the main repository.

Author

Oliver Nguyen  github

About

Extends the standard package iter for working with iterators.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages