Convert a string into a function.