Iterable generic collections for go v1.23+.
Experimental.
You can use these with go1.22 IF you use GOEXPERIMENT=rangefunc
s := collection.NewSet("1", "a", "b")
for i := range s.Iter() {
fmt.Println(i)
}
- Concrete Types: Set, OrderedSet
- Interfaces: Collection
- Funcs: Union(), Intersection()
Data structures:
- Queue, Deque
- LinkedList
- Map? for concurrent/immutable/sorted variants?
Variants:
- Ordered*
- Concurrent*
- Immutable*
- Sorted*