You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to create function Unique with the definition:
// Unique replaces runs of equal elements with a single copy.// Unique modifies the contents of the slice s and returns the modified slice,// which may have a smaller length.funcUnique[S~[]E, Ecomparable](sS) S {}
and yes, we already have Compact, but Compact can not filter items that are not consecutive.
Proposal Details
I propose to create function
Unique
with the definition:and yes, we already have
Compact
, butCompact
can not filter items that are not consecutive.Example of usage:
I have already created PR for this change #66231
The text was updated successfully, but these errors were encountered: