form closure for function definition
add type information to dynexp3