capture the function definition when a curry is started