Help us shape the future of Go! Take the 2026 Go Developer Survey

listutils

package
v0.105.22 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[T comparable](xs []T, target T) bool

func Any

func Any[T comparable](xs []T, target T) bool

func AreSetEqual added in v0.104.0

func AreSetEqual[T comparable](a, b []T) bool

checks if two slices are equal as sets, meaning they have the same unique elements regardless of order and duplicates

func AreStrictlyEqual added in v0.104.0

func AreStrictlyEqual[T comparable](a, b []T) bool

checks if two slices are strictly equal, meaning they have the same elements in the same order

func AreUnorderedEqual added in v0.104.0

func AreUnorderedEqual[T cmp.Ordered](a, b []T) bool

checks if two slices are equal, meaning they have the same elements regardless of order

func MaxOf added in v0.90.4

func MaxOf[T any](xs []T, fn func(T) int) int

inspiration: max/3 https://elixir.hexdocs.pm/Enum.html#max/3

func Uniq

func Uniq[T comparable](xs []T) []T

inspiration: uniq/1 https://elixir.hexdocs.pm/Enum.html#uniq/1

func UniqBy added in v0.90.9

func UniqBy[T comparable, K comparable](xs []T, fn func(x T) K) []T

inspiration: uniq_by/2 https://elixir.hexdocs.pm/Enum.html#uniq_by/2

Types

This section is empty.

Jump to

Keyboard shortcuts

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