def _first(iterable, what, test='equality'):
    """return the index of the first occurance of ``what`` in ``iterable``
    """
    if test=='equality':
        for index, item in enumerate(iterable):
            if item == what:
                break
        else:
                index = None
    else:
        raise NotImplementedError
    return index