: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: '[]'

def chaincalls(callables, obj):
    """
    :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: '[]'
    """
    for fun in callables:
        if not callable(fun):
            raise ValueError("Not callable: %r" % repr(fun))
        obj = fun(obj)

    return obj