improved placeholder handling in func_compose