Create a command-line program from a function
