iterators

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RangeCol

func RangeCol[C Collection[T], T any](col C, yield func(item T) bool)

RangeCol goes over the collection and calls the function, stopping early if yield returns false

func RangeColParralel

func RangeColParralel[C Collection[T], T any](colls []C, yield func(item T) bool)

Types

type Collection

type Collection[T any] interface {
	// Read is an iterator over sequences of individual values.
	// When called as seq(yield), seq calls yield(v) for each value v in the sequence, stopping early if yield returns false. See the iter package documentation for more details.
	Read() iter.Seq[T]
}

Jump to

Keyboard shortcuts

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