The comments above serve as documentation of the method for users. I'm not sure if details of type inference should be part of that. Do you have anything specific that you would like me to write here?