code: def apply(funcs, stack):
    '''Apply functions to the stack, passing the resulting stack to next state.'''
    return reduce(lambda x, y: y(x), funcs, stackf apply(funcs, stack):
    '''Apply functions to the stack, passing the resulting stack to next state.'''
    return reduce(lambda x, y: y(x), funcs, stack)
docs: Apply functions to the stack, passing the resulting stack to next state.