Documentation
¶
Overview ¶
Package stream implements a sequence of elements supporting sequential and parallel aggregate operations. this package is an experiment to explore if stream in go can work as the way java does. it's complete, but not powerful like other libs
Index ¶
- func Concat[T any](a, b stream[T]) stream[T]
- func FromChannel[T any](source <-chan T) stream[T]
- func FromRange[T constraints.Integer | constraints.Float](start, end, step T) stream[T]
- func FromSlice[T any](source []T) stream[T]
- func Generate[T any](generator func() func() (item T, ok bool)) stream[T]
- func Of[T any](elems ...T) stream[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Concat ¶
func Concat[T any](a, b stream[T]) stream[T]
Concat creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
func FromChannel ¶
func FromChannel[T any](source <-chan T) stream[T]
FromChannel creates stream from channel.
func FromRange ¶
func FromRange[T constraints.Integer | constraints.Float](start, end, step T) stream[T]
FromRange creates a number stream from start to end. both start and end are included. [start, end]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.