Versions in this module Expand all Collapse all v0 v0.2.1 Jan 1, 2023 Changes in this version type Stream + func Flat(xss *Stream[[]X]) *Stream[X] v0.1.1 Nov 25, 2022 v0.0.3 Nov 20, 2022 v0.0.2 Nov 18, 2022 v0.0.1 Nov 17, 2022 Changes in this version + var ErrEmpty = errors.New("st: empty") + var ErrNotSingle = errors.New("st: not single") + var ErrStop = errors.New("st: stop") + func Fold(xs *Stream[X], v V, f func(V, X) V) (V, error) + func ToDict(xs *Stream[X], f func(X) K) (map[K]X, error) + func ToError(xs *Stream[X]) error + func ToFunc(xs *Stream[X]) func() (X, error) + func ToList(xs *Stream[X]) ([]X, error) + type Complex interface + type Float interface + type Integer interface + type Number interface + type Real interface + type Result struct + Key K + Values []X + func (a *Result[K, X]) Avg(f func(X) float64) float64 + func (a *Result[K, X]) Count() int + func (a *Result[K, X]) Max(f func(X) float64) float64 + func (a *Result[K, X]) Median(f func(X) float64) float64 + func (a *Result[K, X]) Min(f func(X) float64) float64 + func (a *Result[K, X]) Std(f func(X) float64) float64 + func (a *Result[K, X]) Sum(f func(X) float64) float64 + func (a *Result[K, X]) Var(f func(X) float64) float64 + type Signed interface + type Stream struct + func Concat(xs *Stream[X], xss ...*Stream[X]) *Stream[X] + func CrossJoin(xs *Stream[X], ys *Stream[Y], f func(X, Y) Z) *Stream[Z] + func Distinct(xs *Stream[X]) *Stream[X] + func Filter(xs *Stream[X], f func(X) bool) *Stream[X] + func FromDict(dict map[K]X) *Stream[X] + func FromError(err error) *Stream[X] + func FromFunc(f func() (X, error)) *Stream[X] + func FromList(list []X) *Stream[X] + func Group(xs *Stream[X], f func(X) K) *Stream[*Result[K, X]] + func LeftJoin(xs *Stream[X], ys *Stream[Y], xk func(X) K, yk func(Y) K, f func(K, X, Y) Z) *Stream[Z] + func Make(xs ...X) *Stream[X] + func Map(xs *Stream[X], f func(X) Y) *Stream[Y] + func New(head X, builder func() *Stream[X]) *Stream[X] + func Range(a, b, s X) *Stream[X] + func Repeat(x X) *Stream[X] + func RightJoin(xs *Stream[X], ys *Stream[Y], xk func(X) K, yk func(Y) K, f func(K, X, Y) Z) *Stream[Z] + func Sequence(a, s X) *Stream[X] + func Zip(xs *Stream[X], ys *Stream[Y], f func(X, Y) Z) *Stream[Z] + func (a *Stream[X]) All(f func(X) bool) (bool, error) + func (a *Stream[X]) Any(f func(X) bool) (bool, error) + func (a *Stream[X]) Append(xs ...X) *Stream[X] + func (a *Stream[X]) Concat(xss ...*Stream[X]) *Stream[X] + func (a *Stream[X]) Count() (int, error) + func (a *Stream[X]) Drop(n int) *Stream[X] + func (a *Stream[X]) DropWhile(f func(X) bool) *Stream[X] + func (a *Stream[X]) Each(f func(int, X) error) error + func (a *Stream[X]) Filter(f func(X) bool) *Stream[X] + func (a *Stream[X]) Fold(v X, f func(X, X) X) (X, error) + func (a *Stream[X]) Force() *Stream[X] + func (a *Stream[X]) Head() (X, error) + func (a *Stream[X]) IsEmpty() bool + func (a *Stream[X]) Map(f func(X) X) *Stream[X] + func (a *Stream[X]) Prepend(xs ...X) *Stream[X] + func (a *Stream[X]) Single(defaults ...X) (x X, err error) + func (a *Stream[X]) Skip(n int) *Stream[X] + func (a *Stream[X]) SkipWhile(f func(X) bool) *Stream[X] + func (a *Stream[X]) Sort(f func(x, y X) bool) *Stream[X] + func (a *Stream[X]) Tail() *Stream[X] + func (a *Stream[X]) Take(n int) *Stream[X] + func (a *Stream[X]) TakeWhile(f func(X) bool) *Stream[X] + func (a *Stream[X]) ToError() error + func (a *Stream[X]) ToFunc() func() (X, error) + func (a *Stream[X]) ToList() ([]X, error) + type Unsigned interface