func WithBanner(banner string) Option {
	return func(repl *REPL) {
		repl.banner = banner
	}
}
// WithOutput sets the REPL's output stream.`nil` defaults to stdout.
func WithOutput(w io.Writer) Option {
if w == nil {
w = os.Stdout
}
return func(repl *REPL) {
repl.output = w
}
}
WithBanner sets the REPL's banner which is displayed once when the REPL
starts.
package repl
import (
	"io"
	"os"
	"github.com/spy16/slurp/reader"
)
type Option func(repl *REPL)
type ReaderFactory interface {
	NewReader(r io.Reader) *reader.Reader
}
type ReaderFactoryFunc func(r io.Reader) *reader.Reader
func (factory ReaderFactoryFunc) NewReader(r io.Reader) *reader.Reader {
	return factory(r)
}
type ErrMapper func(err error) error
func WithInput(in Input, mapErr ErrMapper) Option {
	if in == nil {
		in = NewPrompt(NewLineReader(os.Stdin), os.Stdout)
	}
	if mapErr == nil {
		mapErr = func(e error) error { return e }
	}
	return func(repl *REPL) {
		repl.input = in
		repl.mapInputErr = mapErr
	}
}