REBOL Document

Unique - Function Summary


Returns a set with duplicate values removed.


unique set


set - The set argument. (must be: series)


/case - Use case-sensitive comparison

/skip - Treat the series as records of fixed size

size - The size argument. (must be: integer)


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.

<Back | Index | Next>

Copyright 2004 REBOL Technologies