Documentation
¶
Index ¶
- func All[T any](seq iter.Seq[T], fn func(T) bool) bool
- func AllSlice[T any](slice []T, fn func(T) bool) bool
- func Any[T any](seq iter.Seq[T], fn func(T) bool) bool
- func AnySlice[T any](slice []T, fn func(T) bool) bool
- func Filter[T1 any](items iter.Seq[T1], f func(T1) bool) iter.Seq[T1]
- func FilterSlice[T1 any](items []T1, f func(T1) bool) []T1
- func Map[T1, T2 any](items iter.Seq[T1], f func(T1) T2) iter.Seq[T2]
- func MapSlice[T1, T2 any](items []T1, f func(T1) T2) []T2
- func MustLines(r io.Reader) iter.Seq[string]
- func MustLinesBytes(r io.Reader) iter.Seq[[]byte]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
Filter returns an iteartor that outputs each item from the given sequence that satisfy the condition "f(item) == true".
func FilterSlice ¶
Filter returns a slice that contains all items from the given slice that satisfy the condition "f(item) == true".
func Map ¶
Map returns an iterator that outputs the result of the function f applied to each item of the given Sequence.
func MapSlice ¶
func MapSlice[T1, T2 any](items []T1, f func(T1) T2) []T2
Map returns a slice of which each items contains the result of the function f applied to each item from the provided slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.