def create_function_of_function(outer_function, inner_function):
    """
    function that can itself return a function that sequentially apply two functions and so can be used recursively to
        create a series of functions

    :param outer_function: function
        last function to be called
    :param inner_function: function
        first function to be called
    :return: function
        composite function that applies the inner and then the outer function, allowing the time parameter to be passed
            through if necessary
    """
    return lambda time: outer_function(inner_function(time), time)