Returns a new ImmutableDict instance with value associated with key.
        The implicit parameter is not modified.

def assoc(self, key, value):
        '''Returns a new ImmutableDict instance with value associated with key.
        The implicit parameter is not modified.'''
        copydict = ImmutableDict()
        copydict.tree = self.tree.assoc(hash(key), (key, value))
        copydict._length = self._length + 1
        return copydict