Documentation ¶
Overview ¶
Package valit allows for native Go values to be used with iterators.
Iterators:
- Copies - yields copies of a given value forever.
- Fill - yields the same value forever.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Copier ¶
type Copier[T any] interface { Copy() T }
Copier represents a struct that can copy itself.
type CopyIterator ¶
type CopyIterator[T Copier[T]] struct { // contains filtered or unexported fields }
CopyIterator represents an iterator yielding copies of a given value on every iteration of the iterator.
func (CopyIterator[T]) Next ¶
func (it CopyIterator[T]) Next() bool
func (CopyIterator[T]) Value ¶
func (it CopyIterator[T]) Value() T
type FillIterator ¶
type FillIterator[T any] struct { // contains filtered or unexported fields }
FillIterator represents an iterator yielding the same value over and over again.
func (FillIterator[T]) Next ¶
func (it FillIterator[T]) Next() bool
func (FillIterator[T]) Value ¶
func (it FillIterator[T]) Value() T
Click to show internal directories.
Click to hide internal directories.