def polynomial(coeffs):
    """
    Return a polynomial function which with coefficients `coeffs`.
    
    Coefficients are list lowest-order first, so that ``coeffs[i]`` is the coefficient in front of ``x**i``.
    """
    if len(coeffs)==0:
        return lambda x:x*0
    def f(x):
        y=(x*0)+coeffs[0]
        for p,c in enumerate(coeffs[1:]):
            y=y+c*x**(p+1)
        return y
    return f