def compact_0(iterable):
    """Return new iterable with adjacent duplicate values removed."""
    deduped = []
    previous = object()
    for item in iterable:
        if item != previous:
            deduped.append(item)
            previous = item
    return deduped