def compare(args, func):
    """ Check if all the numbers in the list satisfy the constraint
    
    Args:
        args(list): a list of numbers to be checked
        func(function): the constraint function
        
    Return(Boolean): True/False represents if the list satisfies the constraint
    """
    
    for i in range(len(args)-1):
        if not func(args[i], args[i+1]):
            return False
    return True