Documentation
¶
Index ¶
- func Reduce[T, U any](iter Nexter[T], reducer func(accumulator U, next T) U, inital U) U
- type ChanIter
- type DeIterator
- type Excluder
- type IterExcluder
- type IterMapper
- type IterReverser
- type IterSelector
- type IterSkipper
- type IterTaker
- type Iterator
- func (iter Iterator[T]) Collect() []T
- func (iter Iterator[T]) Exclude(excluder func(T) bool) Iterator[T]
- func (iter Iterator[T]) ForEach(each func(T))
- func (iter Iterator[T]) Reverse() Iterator[T]
- func (iter Iterator[T]) Select(selector func(T) bool) Iterator[T]
- func (iter Iterator[T]) SkipN(n int) Iterator[T]
- func (iter Iterator[T]) SkipWhile(skipIf func(T) bool) Iterator[T]
- func (iter Iterator[T]) TakeN(n int) Iterator[T]
- func (iter Iterator[T]) TakeWhile(takeIf func(T) bool) Iterator[T]
- type Lenner
- type ListIter
- type Mapper
- type NSkipper
- type NTaker
- type NextBacker
- type Nexter
- type Reverser
- type Selector
- type SliceIter
- type WhileSkipper
- type WhileTaker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChanIter ¶
type ChanIter[T any] struct { // contains filtered or unexported fields }
func FromChannel ¶
FromChannel makes ChanIter associated with given channel. To convey end of iterator, close passed channel.
type DeIterator ¶
type DeIterator[T any] interface { Nexter[T] NextBacker[T] }
Doubly ended iterator.
type Excluder ¶
type Excluder[T any] struct { // contains filtered or unexported fields }
func NewExcluder ¶
func NewExcluder[T any](iter DeIterator[T], excluder func(T) bool) Excluder[T]
type IterExcluder ¶
type IterMapper ¶
type IterReverser ¶
type IterSelector ¶
type IterSkipper ¶
type IterSkipper[T any] interface { SkipN() NSkipper[T] SkipWhile(skipIf func(T) bool) WhileSkipper[T] }
type IterTaker ¶
type IterTaker[T any] interface { TakeN() NTaker[T] TakeWhile(skipIf func(T) bool) WhileTaker[T] }
type Iterator ¶
type Iterator[T any] struct { DeIterator[T] }
func Map ¶
func Map[T, U any](iter DeIterator[T], mapper func(T) U) Iterator[U]
type ListIter ¶
type ListIter[T any] struct { // contains filtered or unexported fields }
type NSkipper ¶
type NSkipper[T any] struct { // contains filtered or unexported fields }
func NewNSkipper ¶
func NewNSkipper[T any](iter DeIterator[T], n int) *NSkipper[T]
type NextBacker ¶
type Reverser ¶
type Reverser[T any] struct { // contains filtered or unexported fields }
func NewReverser ¶
func NewReverser[T any](iter DeIterator[T]) Reverser[T]
type Selector ¶
type Selector[T any] struct { // contains filtered or unexported fields }
func NewSelector ¶
func NewSelector[T any](iter DeIterator[T], selector func(T) bool) Selector[T]
type SliceIter ¶
type SliceIter[T any] struct { // contains filtered or unexported fields }
type WhileSkipper ¶
type WhileSkipper[T any] struct { // contains filtered or unexported fields }
func NewWhileSkipper ¶
func NewWhileSkipper[T any](iter DeIterator[T], skipIf func(T) bool) *WhileSkipper[T]
func (*WhileSkipper[T]) Next ¶
func (s *WhileSkipper[T]) Next() (next T, ok bool)
func (*WhileSkipper[T]) NextBack ¶
func (s *WhileSkipper[T]) NextBack() (next T, ok bool)
type WhileTaker ¶
type WhileTaker[T any] struct { // contains filtered or unexported fields }
func NewWhileTaker ¶
func NewWhileTaker[T any](iter DeIterator[T], takeIf func(T) bool) *WhileTaker[T]
func (*WhileTaker[T]) Next ¶
func (s *WhileTaker[T]) Next() (next T, ok bool)
func (*WhileTaker[T]) NextBack ¶
func (s *WhileTaker[T]) NextBack() (next T, ok bool)
Click to show internal directories.
Click to hide internal directories.