Pike v8.0 release 1738

Method Array.uniq()


Method uniq

array uniq(array a)

Description

Remove elements that are duplicates.

Returns

This function returns an copy of the array a with all duplicate values removed. The order of the values is kept in the result; it's always the first of several equal elements that is kept.

Note

Elements are compared with `==. They are also hashed (see lfun::__hash for further details if the array contains objects).