def chain(*fs):
    '''
    Concatenate functions
    '''
    def chained(x):
        for f in reversed(fs):
            if f:
                x=f(x)
        return x
    return chained
def chain(*fs):
    '''
    Concatenate functions
    '''
    def chained(x):
        for f in reversed(fs):
            if f:
                x=f(x)
        return x
    return chained
def chain ( * fs ) : def chained ( x ) : for f in reversed ( fs ) : if f : x = f ( x ) return x return chained
Concatenate functions
Concatenate functions