Skip to content

An experimental collection (partly inspired by Haskell's prelude) of utility functions for working with Go iterators.

License

Notifications You must be signed in to change notification settings

jub0bs/iterutil

Repository files navigation

jub0bs/iterutil

tag Go Version Go Reference license build codecov goreport

An experimental collection (partly inspired by Haskell's prelude) of utility functions for working with Go iterators.

Installation

go get github.com/jub0bs/iterutil

jub0bs/iterutil requires Go 1.23 or above.

Documentation

The documentation is available on pkg.go.dev.

Code coverage

coverage

License

All source code is covered by the MIT License.

FAQ

Can I depend on this library?

You can, but at your own peril. As stated above, this library is experimental; more than anything else, it's an excuse for me to flex my functional-programming muscles and familiarize myself with Go 1.23's iterators. At this early stage, I reserve the right, upon new releases, to break the API: some functions may see their names and/or signatures change, and some functions may be removed altogether.

If you need a few functions from this library but do not want to depend on it, feel free to copy their sources in your project; a little copying is better than a little dependency.

How should I use this library?

Above all, use it with parsimony. The functional style displayed by this library is far from ideal in Go, for several reasons:

  • code readability may suffer, in part because Go's idiosyncracies hinder a "fluent interface" style and because Go lacks a concise notation for anonymous functions;
  • a more classic and imperative style is likely to prove much more performant;
  • Go lacks the powerful laziness of Haskell.

Bear in mind that the existence of this library is no license to adopt a functional style all over your codebase!

About

An experimental collection (partly inspired by Haskell's prelude) of utility functions for working with Go iterators.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages