def AnyInSet(operator):
    """
    Apply an operator to all elements in a set and check if any of them return true
    """
    return lambda elem, val: any(map(lambda item: operator(item, val), elem))