def add(self, fn, name=None):
        """Add a function that the dispatcher will know about.

        fn -- a callable object
        name -- optional alias for the function

        """
        if not name:
            name = fn.__name__
        self.functions[name] = fn