Idiomatic way to build list with successive function calls on that list
<p>It's a bit hard to explain in a concise title what I'm asking, so here's the explanation. I have a list of classes and these objects all contain their own set of data. The problem that I'm having is that I try to iterate over these objects and filter out data that is used in one of the objects that precedes the current one in the list. The code fragment looks like this:</p>

<pre><code>objs = [list-of-objects]
used = set([])
for obj in objs:
    used = used.union(obj.callSomeFunc(used))
</code></pre>

<p>That callSomeFunc member returns a set of data that it has that does not intersect with the current used set.</p>

<p>This code works, but I don't really like it, and I can't believe that there isn't a better way to do this.</p>
