Daehyun
10/26/2016 - 5:46 AM

poly.py

from functools import reduce
def poly(*pars):
	def func(x):
		def sum(subsum, zipped_par):
			idx, par = zipped_par
			return subsum+par*x**idx 
		return reduce(sum, enumerate(pars), 0.0)
	return func