class Signal(list):
def __call__(self, *args):
for c in self: apply(c, args)
class SignalAdaptor:
def __init__(self, signal, adaptor_func):
self.signal = signal
self.adaptor_func = adaptor_func
def __call__(self, *args):
apply(self.signal, apply(self.adaptor_func, args))