slices

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](slice []T, cb func(T) bool) []T

func Find

func Find[T comparable](haystack []T, compare func(v T) bool) (T, bool)

func Has

func Has[T comparable](haystack []T, needle T) bool

func Map

func Map[T, U any](slice []T, cb func(v T) U) []U

Types

type Equaler

type Equaler[T any] interface {
	Equal(T) bool
}

Jump to

Keyboard shortcuts

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