iter

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type It

type It[T any] interface {
	HasNext() bool
	Next() T
	Peek(func(T)) It[T]
}

func Arr

func Arr[T any](slice []T) It[T]

func Chan

func Chan[T any](ch chan *T) It[T]

func Generate

func Generate[T any](generator func() (T, bool)) It[T]

func Map

func Map[T, R any](it It[T], mappingFunc func(val T) R) It[R]

func Single

func Single[T any](val T) It[T]

func Sink

func Sink[T any](sinkConsumer func(sink ItSink[T])) It[T]

type ItMap

type ItMap[T, R any] interface {
	Map(func(T) R) It[R]
}

type ItSink

type ItSink[T any] interface {
	OnNext(T)
	Complete()
}

Jump to

Keyboard shortcuts

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