def chaincalls(callables, obj):
for fun in callables:<EOL><INDENT>if not callable(fun):<EOL><INDENT>raise ValueError("<STR_LIT>" % repr(fun))<EOL><DEDENT>obj = fun(obj)<EOL><DEDENT>return obj<EOL>
:param callables: callable objects to apply to obj in this order
:param obj: Object to apply callables

>>> chaincalls([lambda a: a + 1, lambda b: b + 2], 0)
3
>>> chaincalls([[]], 0)
Traceback (most recent call last):
ValueError: Not callable: '[]'