from functools import reduce


def thrush(x, *funcs):
    """ Pipes x through funcs in the given order. That is, applies the first
        func to x, applies the second func to the result, etc.

        >>> thrush(1, lambda x: x+2, lambda x: x/2.0)
        1.5
        >>> thrush(1, lambda x: x/2.0, lambda x: x+2)
        2.5
        >>> thrush('no-op')
        'no-op'
    """
    return reduce(lambda res, f: f(res), funcs, x)