REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: unique

unique  set1  /case  /skip  size

Returns the data set with duplicates removed.


set1 [block! string! binary! bitset! typeset!]


/case - Use case-sensitive comparison (except bitsets)

/skip - Treat the series as records of fixed size

size [integer!]

See also:

intersect   union   difference   exclude  


Removes all duplicate values from a set or series:

lunch: [ham cheese bread carrot ham ham carrot]
probe unique lunch
[ham cheese bread carrot]
probe unique [1 3 2 4 3 5 4 6]
[1 3 2 4 5 6]
string: "CBADEDCF"
probe unique string

Note that performing this function over very large data sets can be CPU intensive.

  TOC < Back Next > - WIP Wiki Feedback Admin