def find_first1(l, pred):
    """
    Find first occurrence in list satisfying predicate.
    :param l: list.
    :param pred: predicate on the list elements.
    :return: index of first occurrence in list satisfying predicate; length of the list if not found.
    """
    length = len(l)
    index = length
    for i in range(length):
        if pred(l[i]):
            index = i
            break
    return index