unique(stream) yielding each element only the first time it appears, preserving order, working lazily on unbounded streams (a seen-set grows, but nothing is precomputed). Elements are hashable.list(unique(['a', 'b', 'a', 'c', 'b']))
['a', 'b', 'c']
Repeats are filtered as they flow past.
A set of seen items plus a conditional yield.
Add after yielding or before — just be consistent.