Subject: Re: Alternative to except operator that preserves order?
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 10 Jan 2012 07:48:37 +0000
|
On 10 January 2012 07:23, TW <zupftom@xxxxxxxxxxxxxx> wrote:
> I'm processing a sorted sequence of elements, recursively eliminating
> elements that have already been processed. I'm using "except" for
> this purpose, but except destroys the order and returns the remaining
> elements in document order, so I have to re-sort them every time. Not
> so much of a problem because the sequences are not very large, but I
> wondered, whether in general there is a better idiom for preserving
> the pre-sorted order in situations like this. The archive didn't make
> me any wiser.
Small, complete runnable code sample demonstrating the problem please.
--
Andrew Welch
http://andrewjwelch.com
|