def chain(gen_input, *gen_funcs):
	"""
	Chain generator functions by calling each generator with the input of the previous one.
	The first generator is passed the gen_input value
	"""
	for func in gen_funcs:
		gen_input = func(gen_input)
	return gen_input