def unique_justseen(iterable, key=None):
<EOL>try:<EOL><INDENT>from itertools import imap as map<EOL><DEDENT>except ImportError:<EOL><INDENT>from builtins import map<EOL><DEDENT>return map(next, map(operator.itemgetter(<NUM_LIT:1>), itertools.groupby(iterable, key)))<EOL>
List unique elements, preserving order. Remember only the element just seen.