def contains(search_list, predicate):
    """Returns true if and only if the list contains an element x where predicate(x) is True."""

    for element in search_list:
        if predicate(element):
            return True
    return False