iter

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect[T any](seq Seq[T]) (res []T)

func Consume

func Consume[T any](seq Seq[T], fn func(T))

func Contains added in v0.5.0

func Contains[T comparable](seq Seq[T], item T) bool

func First

func First[T any](seq Seq[T]) T

func Pull

func Pull[T any](seq Seq[T]) (iter func() (T, bool), stop func())

Types

type Seq

type Seq[V any] func(yield func(V) bool)

func From

func From[T any](in ...T) Seq[T]

func Map

func Map[S, R any](seq Seq[S], fn func(S) R) Seq[R]

Jump to

Keyboard shortcuts

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