slices

package
v0.0.100 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: CC0-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists[T any](predicate funcs.Predicate[T]) funcs.Applier[[]T, bool]

func Filter

func Filter[T any](predicate funcs.Predicate[T]) funcs.Applier[[]T, []T]

func FindFirst added in v0.0.96

func FindFirst[T any](predicate funcs.Predicate[T]) funcs.Applier[[]T, opt.Option[T]]

func FlatMap

func FlatMap[V, V1 any](fMap FMapper[V, V1]) funcs.Applier[[]V, []V1]

func Flatten

func Flatten[T any](tss [][]T) []T
func Head[T any](ts []T) T

func HeadOpt

func HeadOpt[T any](ts []T) *T

func HeadOption

func HeadOption[T any](ts []T) opt.Option[T]

func Join

func Join[T any](tss ...[]T) []T

func Map

func Map[V, V1 any](mapper funcs.Mapper[V, V1]) funcs.Applier[[]V, []V1]

func Split

func Split[T any](predicate funcs.Predicate[T]) func([]T) ([]T, []T)

Split returns funcs.Applier producing suitable for predicate values on the left, and non-suitable on the right.

func Tail

func Tail[T any](ts []T) []T

func ToMapWithKeys

func ToMapWithKeys[K comparable, V any](keyProducer func(V) K) funcs.Applier[[]V, map[K]V]

func ToMapWithValues

func ToMapWithValues[K comparable, V any](valueGenerator func(k K) V) funcs.Applier[[]K, map[K]V]

func ToMultimapWithKeys

func ToMultimapWithKeys[K comparable, V any](keyProducer func(V) K) funcs.Applier[[]V, map[K][]V]

Types

type FMapper

type FMapper[K, K1 any] funcs.Mapper[K, []K1]

Jump to

Keyboard shortcuts

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