********************************************* Automatic Type-Dependent Closure Construction *********************************************