Separate REPL from main, allow main to specify a readline routine to use.
improve results display when there is more than one return value.