Call stringify() as a method, not function.

You probably want to pass the overload function as a name, rather than a coderef.  That way, will be called as a method on the object, and subclasses will have the opportunity to override it if they want.