slc

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T ~[]E, E comparable](a T, t E) bool

func Filter

func Filter[T any](a []T, f func(T) bool) []T

func FlatMap

func FlatMap[T, R any](a []T, f func(T) []R) []R

func ForEach

func ForEach[T any](a []T, f func(T))

func Map

func Map[T, R any](a []T, f func(T) R) []R

func MapI

func MapI[T, R any](a []T, f func(T, int) R) []R

func Reduce

func Reduce[T, R any](a []T, f func(r R, t T) R, defaultVal ...R) R

func ReduceErr

func ReduceErr[T any](a []T, f func(t T) error) error

func RemoveDuplicates

func RemoveDuplicates[T comparable](a []T) []T

func Reverse

func Reverse[T ~[]E, E any](a T) T

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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