<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isconstant(args, quoted=False):
 """Checks if value is a boolean, number or string."""

    check = lambda c: isbool(c) or isnumber(c) or isstring(c, quoted)
    if isinstance(args, list):
        return all(map(check, args))
    else:
        return check(args)