On 03/06/2008, at 7:45 PM, Guido Tack wrote: > The problem is here: testing B.in(b) is linear time, so it's just as > expensive as finding a new b. Ah. Is there a way to iterate through the elements of B's domain in order in time proportional to the number of elements? Malcolm