Skip to content

iterable, generic collections for go 1.23+. experimental

License

Notifications You must be signed in to change notification settings

laher/collection

Repository files navigation

Collections

Go Reference

Iterable generic collections for go v1.23+.

Experimental.

You can use these with go1.22 IF you use GOEXPERIMENT=rangefunc

Example

s := collection.NewSet("1", "a", "b")
for i := range s.Iter() {
    fmt.Println(i)
}

Done so far

  • Concrete Types: Set, OrderedSet
  • Interfaces: Collection
  • Funcs: Union(), Intersection()

To maybe do

Data structures:

  • Queue, Deque
  • LinkedList
  • Map? for concurrent/immutable/sorted variants?

Variants:

  • Ordered*
  • Concurrent*
  • Immutable*
  • Sorted*

About

iterable, generic collections for go 1.23+. experimental

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages