Hi David,

On Tuesday, July 5, 2005, 4:46:23 AM, you wrote:

D> I can't seem to find the right combination of functions to
D> do this: Create a series containing the values that are
D> repeated in another series. For example, if the first series is
D> [1 2 2 3 4 5 5 5 6], the new series should be [2 5]. Any hints
D> or solutions are appreciated.

Is the series sorted? If so, what about:

    dups: []
    lastval: none
    foreach element series [
        if element = lastval [append dups element]
        lastval: element
    ]
    dups: unique dups

(Note,  actually  this only needs that the duplicates are grouped,
not that the series is sorted.)

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  ---  http://www.rebol.com/
Colella Chiara software division --- http://www.colellachiara.com/

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to