lazy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainIter

type ChainIter[E any] struct {
	// contains filtered or unexported fields
}

This is not in use

func ChainIterators

func ChainIterators[E any](iterators ...Iter[E]) *ChainIter[E]

func (*ChainIter[E]) Chain

func (ci *ChainIter[E]) Chain(iter Iter[E]) *ChainIter[E]

func (*ChainIter[E]) Next

func (ci *ChainIter[E]) Next() (bool, E)

type FuncIterator

type FuncIterator[E, V any] struct {
	// contains filtered or unexported fields
}

func NewFuncIterator

func NewFuncIterator[E, V any](iter Iter[E], transformer Transform[E, V]) *FuncIterator[E, V]

func (*FuncIterator[E, V]) Next

func (fi *FuncIterator[E, V]) Next() (bool, V)

type Iter

type Iter[E any] interface {
	Next() (bool, E)
}

func Filter

func Filter[E any](iter Iter[E], mapper slicendice.FilterFunc[E]) Iter[E]

func FilterIntoIter

func FilterIntoIter[E any](elements []E, mapper slicendice.FilterFunc[E]) Iter[E]

func Map

func Map[E, V any](iter Iter[E], mapper slicendice.MapperFunc[E, V]) Iter[V]

func MapIntoIter

func MapIntoIter[E, V any](elements []E, mapper slicendice.MapperFunc[E, V]) Iter[V]

func Take

func Take[E any](n int, iter Iter[E]) Iter[E]

func TakeIntoIter

func TakeIntoIter[E any](n int, elements []E) Iter[E]

type SliceIterator

type SliceIterator[E any] struct {
	// contains filtered or unexported fields
}

func ToSliceIter

func ToSliceIter[E any](elements []E) *SliceIterator[E]

func (*SliceIterator[E]) Next

func (it *SliceIterator[E]) Next() (bool, E)

func (*SliceIterator[E]) Reset

func (it *SliceIterator[E]) Reset()

type Transform

type Transform[E, V any] func(E, int) (bool, V)

Jump to

Keyboard shortcuts

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