Documentation ¶
Overview ¶
Package uniq provides removal of adjacent duplicate elements in slices. It is similar to the unix command uniq.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModifySlice ¶
func ModifySlice[E comparable](slice *[]E)
ModifySlice removes adjacent duplicate elements from the given slice. It adjusts the length of the slice appropriately and zeros the tail.
ModifySlice does O(len(*slice)) operations.
func ModifySliceFunc ¶
ModifySliceFunc is the same as ModifySlice except that it allows using a custom comparison function.
eq should report whether the two provided elements are equal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.