<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def actions(acts, done):
    '''
    Prepare actions pipeline.

    :param tuple acts: called functions
    :param function done: get result from actions
    :returns function: function that starts executio
    '''

    def _intermediate(acc, action):
        result = action(acc['state'])
        values = concatv(acc['values'], [result['answer']])

        return {'values': values, 'state': result['state']}

    def _actions(seed):
        init = {'values': [], 'state': seed}

        result = reduce(_intermediate, acts, init)

        keep = remove(lambda x: x is None, result['values'])

        return done(keep, result['state'])

    return _actions