z

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 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] chan T

Generator is the type that generates the elements of T.

func FilterMap

func FilterMap[T any, R any](collection []T, fn func(T, int) (R, bool)) Generator[R]

FilterMap returns a generator that generates the results of applying the function to each element in the collection.

func (Generator[T]) Next

func (f Generator[T]) Next() *T

Next returns the next element in the collection.

func (Generator[T]) Slice

func (f Generator[T]) Slice() []T

Slice returns a slice of the collection.

Jump to

Keyboard shortcuts

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