def skip_redundant(iterable, skipset=None):
if skipset is None: skipset = set()<EOL>for item in iterable:<EOL><INDENT>if item not in skipset:<EOL><INDENT>skipset.add(item)<EOL>yield item<EOL><DEDENT><DEDENT>
Redundant items are repeated items or items in the original skipset.