from typing import Iterable
from typing import Any
from typing import Iterator
import itertools


def prepend(
        iterable: Iterable[Any],
        value: Any,
        *,
        times: int = 1,
) -> Iterator[Any]:
    """Return an iterator with a specified value prepended.

    Arguments:
        iterable: the iterable to which the value is to be prepended
        value: the value to prepend to the iterable

    Keyword Arguments:
        times: number of times to prepend the value
            (optional; default is 1)

    Returns:
        iterator prepending the specified value(s) to the items of the iterable

    Examples:

    >>> list(prepend(range(5), -1))
    [-1, 0, 1, 2, 3, 4]
    >>> list(prepend(['off to work we go'], 'hi ho', times=2))
    ['hi ho', 'hi ho', 'off to work we go']

    """
    return itertools.chain([value] * times, iterable)