repl.go: generalize to allow a user-specified inspect function.