func New(next NextFunc, im wdte.Importer, macros scanner.MacroMap, start *wdte.Scope) *REPL {
	return &REPL{
		next:   next,
		im:     im,
		macros: macros,
		Scope:  start,
	}
}
New creates a new REPL which reads with next, imports using im, and
executes the first line with the scope start.
package repl
import (
	"bufio"
	"bytes"
	"errors"
	"io"
	"github.com/DeedleFake/wdte"
	"github.com/DeedleFake/wdte/scanner"
)
var (
	ErrIncomplete = errors.New("input incomplete")
)
type NextFunc func() ([]byte, error)
func SimpleNext(r io.Reader) NextFunc {
	s := bufio.NewScanner(r)
	return func() ([]byte, error) {
		more := s.Scan()
		if !more {
			err := s.Err()
			if err != nil {
				err = io.EOF
			}
			return nil, err
		}
		return s.Bytes(), nil
	}
}
type REPL struct {
	Scope *wdte.Scope
	next   NextFunc
	im     wdte.Importer
	macros scanner.MacroMap
	stack []string
	buf   []byte
}