from typing import Callable


def are_valid_elements(vals: list, element_constraint: Callable, args=[], constraint_args={}) -> bool:
    """
    Check if the elements of a list conform ot the provided constraint function

    :param vals: list of values to check against the constraint
    :param element_constraint: function handle used to check each element
    :param args: positional arguments to pass into the element_constraint function
    :param constraint_args: keyword arguments to pass into the element_constraint function
    :return: boolean flag indicating each element in the list meets the constraint
    """

    does_pass = isinstance(vals, list)
    for val in vals:
        does_pass &= element_constraint(val, *args, **constraint_args)

    return does_pass