Is there a way to define the output of a command has what a function returns without terminating it?

Is there a way to define the output of a command has what a function returns without terminating the function?
Continue to help post