Documentation
¶
Index ¶
- func All[T comparable](xs []T, target T) bool
- func Any[T comparable](xs []T, target T) bool
- func AreSetEqual[T comparable](a, b []T) bool
- func AreStrictlyEqual[T comparable](a, b []T) bool
- func AreUnorderedEqual[T cmp.Ordered](a, b []T) bool
- func MaxOf[T any](xs []T, fn func(T) int) int
- func Uniq[T comparable](xs []T) []T
- func UniqBy[T comparable, K comparable](xs []T, fn func(x T) K) []T
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
checks if two slices are equal, meaning they have the same elements regardless of order
func MaxOf ¶ added in v0.90.4
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.
Click to show internal directories.
Click to hide internal directories.