Polytypic Functions Over Nested Datatypes