def general_poly(L):
    """ 
    L, a list of numbers (n0, n1, n2, ... nk)
    Returns a function, which when applied to a value x, returns the value 
    n0 * x^k + n1 * x^(k-1) + ... nk * x^0 
    """
    def poly(L, base):
        '''
        
        '''
        polySum = 0
        exponent = len(L)-1
        for number in L:
            polySum += number*base**exponent
            exponent -= 1
        return polySum
    def polyF(x, l = L):
        return poly(l, x)
    return polyF