Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
func Compare[E constraints.Ordered](s1, s2 []E) int
func Contains ¶
func Contains[E comparable](s []E, v E) bool
Contains reports whether v is present in s.
func Equal ¶
func Equal[E comparable](s1, s2 []E) bool
Equal reports whether two slices are equal: the same length and all elements equal. If the lengths are different, Equal returns false. Otherwise, the elements are compared in increasing index order, and the comparison stops at the first unequal pair. Floating point NaNs are not considered equal.
func Index ¶
func Index[E comparable](s []E, v E) int
Index returns the index of the first occurrence of v in s, or -1 if not present.
func Unique ¶
func Unique[M ~[]K, K comparable](m M) []K
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.