def find_first(list, key):
    """
    Return the index of the first occurrence of the given key (if any).
    If the key does not occur, return None.
    """
    if list == ():
        return None
    else:
        head, tail = list
        if head == key:
            return 0
        else:
            idx = find_first(tail, key)
            if idx is None:
                return None
            else:
                return idx + 1