from typing import Iterable
from typing import List
from typing import Any


def unique(iterable: Iterable) -> List[Any]:
    """Return a list of all unique elements in iterable.

    This function preserves order of elements.

    Example:

    .. code-block:: python3

        unique([3, 2, 1, 1, 2]) -> [3, 2, 1]
    """
    seen = set()
    f = seen.add
    return list(x for x in iterable if not (x in seen or f(x)))