def transform(f, a, b, c, d):
	"""
	Transform a given function linearly.

	If f(t) is the original function, and a, b, c, and d are the parameters in
	order, then the return value is the function

	F(t) = af(cx + d) + b
	"""
	return lambda x: a * f(c * x + d) + b