Fair enough; is the problem here that we are using strange symbols? Would an explicit lambda keyword help?
Existing 'return' keyword is good enough: s:gsub("_(%l)", return ...:upper())