def compose(self, *things):
        '''
        compose applies multiple fsts onto a base implementation.
        Pass the base implementation as last parameter.
        fsts are merged from RIGHT TO LEFT (like function application)
        e.g.:

        class MyFST(object):
            #place introductions and refinements here
            introduce_foo = 'bar'

        compose(MyFST(), MyClass)
        '''
        if not len(things):
            raise CompositionError('nothing to compose')
        if len(things) == 1:
            # composing one element is simple
            return things[0]
        else:
            # recurse after applying last role to object
            return self.compose(*(
                list(things[:-2])  # all but the last two
                # plus the composition of the last two
                + [self._compose_pair(things[-2], things[-1])]
            ))
def compose ( self , * things ) : if not len ( things ) : raise CompositionError ( 'nothing to compose' ) if len ( things ) == 1 : return things [ 0 ] else : return self . compose ( * ( list ( things [ : - 2 ] ) + [ self . _compose_pair ( things [ - 2 ] , things [ - 1 ] ) ] ) )
compose applies multiple fsts onto a base implementation.
        Pass the base implementation as last parameter.
        fsts are merged from RIGHT TO LEFT (like function application)
        e.g.:

        class MyFST(object):
            #place introductions and refinements here
            introduce_foo = 'bar'

        compose(MyFST(), MyClass)