I think the problem is that you are confusing expressions with strings.
You are correct that when you define a function, it should return the function. The problem you are having is that once you define the variable a, it is replaced in your function definition. Therefore, when you ask it to return the function value, it does (with all defined variables replaced with their values).
If you define a string variable and then tell the Nspire to treat this string as an expression (this is what the expr() does), it does not change the defined string but rather converts to an expression with all defined variables replaced.
This may not make "mathematical" sense but from a coding point of view, its natural.
I'm sorry that I couldn't come up with a nice, elegant solution for you but I don't see it as a hack but rather demonstrating how the Nspire treats different data types.
Your original problem was looking up what you had originally defined y to be. If you define y:=string variable, you will always be able to see its definition. If you would like to evaluate with y, then you can convert it to an expression with expr(). Your can perform mathematical calculations with expressions, not strings..
Juan my two cents. Good luck!!
Regards,
Mark
Sent from my iPhone