def append(x: T, xs: Iterable[T]) -> Iterator[T]:
    """ Append a value to an iterable.

    Parameters
    ----------
    x
        An element of type T.
    xs
        An iterable of elements of type T.

    Returns
    -------
    Iterator
        An iterator that yields elements of *xs*, then yields *x*.


    Examples
    --------
    >>> from delphi.utils.fp import append
    >>> list(append(1, [2, 3]))
    [2, 3, 1]

    """

    return chain(xs, [x])