I don't know if I'm the only one who finds this pattern of acting on the string representation of the function as being a bit distressing.
One the one hand it's a bit like using macros, on the other, there's clearly no first class support for it in the language, and the possibilities for breaking things horribly when your best tools are regexen seems high.