def __inclst(intlst, maxval):
    """
        intlst:list
            array representing a number (each item is a digit)
        maxval: int
            max. allowed value for each item in the list, intlst
    Returns
        intlst incremented by 1.
    """
    p=0
    n=len(intlst)
    while p<n:
        if intlst[p]+1 <= maxval:
            intlst[p]+=1
            return intlst
        else:
            intlst[p]=0
            p+=1
    else:
        return None