Documentation ¶
Index ¶
- func Count[T any](iterator Iterator[T]) int
- func ForEach[T any](iterator Iterator[T], action func(t T))
- func ForEachIndex[T any](iterator Iterator[T], action func(i int, t T))
- func ToSlice[T any](iterator Iterator[T]) []T
- type ChannelOption
- type Iterator
- func FromChannel[T any](ch chan T, options ...ChannelOption[T]) Iterator[T]
- func FromMap[TKey comparable, TValue any](m map[TKey]TValue) Iterator[types.Tuple2[TKey, TValue]]
- func FromSlice[T any](slice []T) Iterator[T]
- func Range[T constraints.Integer](begin T, end T) Iterator[T]
- func Select[TSource, TTarget any](iterator Iterator[TSource], transform func(TSource) TTarget) Iterator[TTarget]
- func Where[T any](iterator Iterator[T], where func(t T) bool) Iterator[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachIndex ¶
Types ¶
type ChannelOption ¶
type ChannelOption[T any] func(*channelIterator[T])
func WithContext ¶
func WithContext[T any](cx context.Context) ChannelOption[T]
type Iterator ¶
type Iterator[T any] interface { Next() types.Option[T] }
func FromChannel ¶
func FromChannel[T any](ch chan T, options ...ChannelOption[T]) Iterator[T]
func FromMap ¶
func FromMap[TKey comparable, TValue any](m map[TKey]TValue) Iterator[types.Tuple2[TKey, TValue]]
func Range ¶
func Range[T constraints.Integer](begin T, end T) Iterator[T]
Click to show internal directories.
Click to hide internal directories.