seq — read your data flow left to right
Lazy, chainable collection pipelines built on the standard library's iter.Seq / iter.Seq2, using Go 1.27 generic methods (golang/go#77273) to enable chained calls that change the element type.
Seq[T] is a defined type of iter.Seq[T] — zero-cost convertible, ready to feed into slices.Collect and maps.Keys. Zero third-party dependencies.
Go 1.27zero deps
lazy120+ ops
import "github.com/smallnest/seq" seq.From([]int{1, 2, 3, 4}). Filter(func(n int) bool { return n%2 == 0 }). Map(strconv.Itoa). Collect() // ["2" "4"]
Generated from seq source docs · Design follows the "partition rule": constrained operations (comparable/Ordered/Numeric) are free functions or subtype methods, not Seq[T] methods.
Repository: github.com/smallnest/seq