from typing import Iterable
from typing import Callable


def indexOf(items: Iterable, match: Callable, *args):
    """Returns the index of the first item for which the `match` function returns
    True."""
    for idx, item in enumerate(items):
        if match(item, *args):
            return idx