fns

package
v1.20.5 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[Elem any](src []Elem, fn func(Elem) bool) []Elem

Filter applies fn on all elements in src, producing a new slice containing the elements for which fn returned true, preserving the same order.

func Map

func Map[A, B any](src []A, fn func(A) B) []B

Map applies fn on all elements in src, producing a new slice with the results, in order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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