generator

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator[T any] struct {
	// contains filtered or unexported fields
}

func With

func With[T any](init T, next func(T) T) Generator[T]

func (Generator[T]) Get

func (g Generator[T]) Get() T

func (Generator[T]) Next

func (g Generator[T]) Next() Generator[T]

func (Generator[T]) Take

func (g Generator[T]) Take(n int) []T

Jump to

Keyboard shortcuts

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