Remove closure duplication in generic function application
L5c gen script