func Eval(env Env, analyzer Analyzer, form Any) (Any, error) {
	if analyzer == nil {
		analyzer = constAnalyzer{}
	}
	expr, err := analyzer.Analyze(env, form)
	if err != nil || expr == nil {
		return nil, err
	}
	return expr.Eval(env)
}
Eval performs syntax analysis of the given form to produce an Expr
and evaluates the Expr against the given Env.
package core
import (
	"errors"
	"fmt"
	"strings"
	"sync"
)
const rootEnv = "<main>"
var (
	ErrNotFound = errors.New("not found")
	ErrInvalidName = errors.New("invalid bind name")
)
type Env interface {
	Name() string
	Parent() Env
	Bind(name string, val Any) error
	Resolve(name string) (Any, error)
	Child(name string, vars map[string]Any) Env
}
type Analyzer interface {
	Analyze(env Env, form Any) (Expr, error)
}
type Expr interface {
	Eval(env Env) (Any, error)
}
func Root(env Env) Env {
	for env.Parent() != nil {
		env = env.Parent()
	}
	return env
}