package
Version:
v0.0.0-...-56ccd80
Opens a new window with list of versions in this module.
Published: Sep 30, 2022
License: Unlicense
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Contains[T comparable](xs []T, v T) bool
-
func EMap[T1, T2 any](xs []T1, fn func(x T1, err error) (T2, error)) ([]T2, error)
-
func Filter[T any](xs []T, f func(x T) bool) []T
-
func Map[T1, T2 any](xs []T1, fn func(x T1) T2) []T2
-
func Reduce[T, M any](s []T, f func(M, T) M, init M) M
Contains checks a list contains an item.
EMap does a functional map, but passes any error into the next map call.
The final error is returned.
func Filter[T any](xs []T, f func(x T) bool) []T
Filter removes any values for which f evaluates true.
func Map[T1, T2 any](xs []T1, fn func(x T1) T2) []T2
Map does a functional map operation
func Reduce[T, M any](s []T, f func(M, T) M, init M) M
Reduce converts a slice of T to M.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.