slices

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 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 any](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