NAME

unique - return a vector containing the unique elements of an array

SYNOPSIS

arr.unique()

DESCRIPTION

The unique() method returns a vector containing all unique elements from arr. All duplicate entries are removed from the result. This is similar to APL vec.

RETURN VALUE

A vector containing only the unique elements of arr.

ERRORS

ArgCheck if any arguments are provided.

EXAMPLE

    a = [1, 2, 2, 3, 3, 3]
    a.unique()
1 2 3

    a = {"apple", "orange", "apple", "banana", "orange", "banana"}
    a.unique()
apple orange banana

SEE ALSO

union
intersect
without