REBOL Document

Unique - Function Summary


Summary:

Returns a set with duplicate values removed.

Usage:

unique set

Arguments:

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

Refinements:

/case - Use case-sensitive comparison

/skip - Treat the series as records of fixed size

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

Description:

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
    "CBADEF"

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


<Back | Index | Next>

Copyright 2004 REBOL Technologies