its

package module
v0.0.0-...-988d700 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[T any](seq iter.Seq[T], predicate Predicate[T]) bool

func All2

func All2[K, V any](seq iter.Seq2[K, V], predicate Predicate2[K, V]) bool

func Any

func Any[T any](seq iter.Seq[T], predicate Predicate[T]) bool

func Any2

func Any2[K, V any](seq iter.Seq2[K, V], predicate Predicate2[K, V]) bool

func Chunk

func Chunk[T any](seq iter.Seq[T], n int) iter.Seq[[]T]

func Chunk2

func Chunk2[T any](seq iter.Seq[T]) iter.Seq2[T, T]

func CollectOrError

func CollectOrError[T any](seq iter.Seq2[T, error]) ([]T, error)

func CollectOrJoinError

func CollectOrJoinError[T any](seq iter.Seq2[T, error]) (result []T, err error)

func Empty

func Empty[T any](seq iter.Seq[T]) bool

func Empty2

func Empty2[K, V any](seq iter.Seq2[K, V]) bool

func Enumerate

func Enumerate[T any](seq iter.Seq[T]) iter.Seq2[int, T]

func Filter

func Filter[T any](seq iter.Seq[T], predicate Predicate[T]) iter.Seq[T]

func Filter2

func Filter2[K, V any](seq iter.Seq2[K, V], predicate Predicate2[K, V]) iter.Seq2[K, V]

func Foreach

func Foreach[T any](seq iter.Seq[T], fn func(T))

func Foreach2

func Foreach2[K, V any](seq iter.Seq2[K, V], fn func(K, V))

func From

func From[T any](its Its[T]) iter.Seq[T]

** From * If you implement io.Closer then the iterator will be closed in the end

func From2

func From2[K, V any](its Its2[K, V]) iter.Seq2[K, V]

func Map

func Map[T, U any](seq iter.Seq[T], fn MapFunc[T, U]) iter.Seq[U]

func Map12

func Map12[T, K, V any](seq iter.Seq[T], fn Map12Func[T, K, V]) iter.Seq2[K, V]

func Map21

func Map21[K, V, T any](seq iter.Seq2[K, V], fn Map21Func[K, V, T]) iter.Seq[T]

func Map22

func Map22[T, U, K, V any](seq iter.Seq2[T, U], fn Map22Func[T, U, K, V]) iter.Seq2[K, V]

func Range

func Range(n int) iter.Seq[int]

func Reduce

func Reduce[T, U any](seq iter.Seq[T], acc U, fn ReduceFunc[T, U]) U

func Reduce2

func Reduce2[K, V, T any](seq iter.Seq2[K, V], acc T, fn Reduce2Func[K, V, T]) T

func Reduce2WithError

func Reduce2WithError[K, V, T any](seq iter.Seq2[K, V], acc T, fn Reduce2WithErrorFunc[K, V, T]) (T, error)

func ReduceWithError

func ReduceWithError[T, U any](seq iter.Seq2[T, error], acc U, fn ReduceWithErrorFunc[T, U]) (U, error)

func Window

func Window[T any](seq iter.Seq[T], n int) iter.Seq[[]T]

func Window2

func Window2[T any](seq iter.Seq[T]) iter.Seq2[T, T]

func Zip

func Zip[T, U any](seq1 iter.Seq[T], seq2 iter.Seq[U]) iter.Seq2[T, U]

Types

type Its

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

type Its2

type Its2[K, V any] interface {
	HasNext() bool
	Next() (K, V)
}

type Map12Func

type Map12Func[T, K, V any] = func(T) (K, V)

type Map21Func

type Map21Func[K, V, T any] = func(K, V) T

type Map22Func

type Map22Func[T, U, K, V any] = func(T, U) (K, V)

type MapFunc

type MapFunc[T, U any] = func(T) U

type Predicate

type Predicate[T any] = func(T) bool

type Predicate2

type Predicate2[K, V any] = func(K, V) bool

type Reduce2Func

type Reduce2Func[K, V, T any] = func(acc T, k K, v V) T

type Reduce2WithErrorFunc

type Reduce2WithErrorFunc[K, V, T any] = func(acc T, k K, v V) (T, error)

type ReduceFunc

type ReduceFunc[T, U any] = func(acc U, v T) U

type ReduceWithErrorFunc

type ReduceWithErrorFunc[T, U any] = func(acc U, v T) (U, error)

Jump to

Keyboard shortcuts

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