Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Array

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).