iterops

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chunk added in v1.0.1

func Chunk[T any](i iter.Iterator[T], count int) iter.Iterator[[]T]

func Filter added in v1.0.1

func Filter[T any](i iter.Iterator[T], filter func(T) bool) iter.Iterator[T]

func Flatten added in v1.0.1

func Flatten[T any](i iter.Iterator[[]T]) iter.Iterator[T]

func Map

func Map[T, G any](i iter.Iterator[T], transform func(T) G) iter.Iterator[G]

Types

type ChunkIterator added in v1.0.1

type ChunkIterator[T any] struct {
	// contains filtered or unexported fields
}

func (*ChunkIterator[T]) Next added in v1.0.1

func (ci *ChunkIterator[T]) Next() ([]T, error)

type FilterIterator added in v1.0.1

type FilterIterator[T any] struct {
	// contains filtered or unexported fields
}

func (FilterIterator[T]) Next added in v1.0.1

func (fi FilterIterator[T]) Next() (val T, err error)

type FlattenIterator added in v1.0.1

type FlattenIterator[T any] struct {
	// contains filtered or unexported fields
}

func (*FlattenIterator[T]) Next added in v1.0.1

func (fi *FlattenIterator[T]) Next() (val T, err error)

type MapIterator

type MapIterator[T, G any] struct {
	// contains filtered or unexported fields
}

func (MapIterator[T, G]) Next

func (ti MapIterator[T, G]) Next() (val G, err error)

type ScanIterator added in v1.0.1

type ScanIterator[T any] struct {
	// contains filtered or unexported fields
}

func Scan added in v1.0.1

func Scan[T any](i iter.Iterator[T], transform func(T, T) T) ScanIterator[T]

func (*ScanIterator[T]) Next added in v1.0.1

func (ti *ScanIterator[T]) Next() (val T, err error)

type ZipIterator added in v1.0.2

type ZipIterator[A, B, T any] struct {
	// contains filtered or unexported fields
}

func Zip added in v1.0.2

func Zip[A, B, T any](a iter.Iterator[A], b iter.Iterator[B], transform func(A, B) T) ZipIterator[A, B, T]

func (ZipIterator[A, B, T]) Next added in v1.0.2

func (ti ZipIterator[A, B, T]) Next() (val T, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL