iterator

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSliceIterator

func NewSliceIterator[T any](slice []T) *sliceIterator[T]

Types

type Iterable

type Iterable[T any] interface {
	Iterator() Iterator[T]
}

type Iterator

type Iterator[T any] interface {
	HasNext() bool
	Next() T
}

func NewSetAssertIterator

func NewSetAssertIterator[S comparable, T any](set map[S]struct{}) (Iterator[T], error)

func NewSetIterator

func NewSetIterator[S map[T]struct{}, T comparable](set S) Iterator[T]

Jump to

Keyboard shortcuts

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