Versions in this module Expand all Collapse all v1 v1.0.0 Apr 6, 2022 Changes in this version + func ApplicationExpr(expr Expression) bool + func Apply(app interface{}, args ...interface{}) interface + func AssignExpr(expr Expression) bool + func DefineExpr(expr Expression) bool + func Eval(e *Expression, env *Environment) interface + func EvalArgs(exprs []Expression, env *Environment) []interface + func EvalAssign(e *Expression, env *Environment) + func EvalDefine(e *Expression, env *Environment) + func EvalIf(e *Expression, env *Environment) (interface{}, bool) + func IfExpr(expr Expression) bool + func InitGlobal() + func IsCompound(app interface{}) bool + func IsEmpty(env *Environment) bool + func IsPrimitive(app interface{}) bool + func LambdaApplicationExpr(expr Expression) bool + func LambdaExpr(expr Expression) bool + func NumberExpr(expr Expression) bool + func PerformExpr(expr Expression) bool + func ProcedureExpr(expr Expression) bool + func ProcedureParas(expr Expression) ([]string, int) + func ProcedureVar(expr Expression) string + func SymbolExpr(expr Expression) bool + type CompoundProcedure struct + func Compound(app interface{}) CompoundProcedure + func EvalLambda(e *Expression, env *Environment) CompoundProcedure + func NewCompoundProdedure(paras []string, body Expression, env *Environment) CompoundProcedure + func (c *CompoundProcedure) Body() Expression + func (c *CompoundProcedure) Env() *Environment + func (c *CompoundProcedure) Paras() []string + type Environment struct + Enclose *Environment + Frame Frame + var GlobalEnv *Environment + func ExtendEnv(enclose *Environment, vars []string, vals []interface{}) *Environment + func (env *Environment) DefineVariable(v string, val interface{}) + func (env *Environment) LookUpVariable(v string) interface{} + func (env *Environment) SetVariable(v string, val interface{}) + type Expression []string + func ApplicationName(expr Expression) Expression + func ApplicationaParas(expr Expression) ([]Expression, int) + func ExtractParas(e Expression) (Expression, int) + func IfBody(expr Expression) (Expression, int) + func MakeExpr(text string) *Expression + func NextBlock(e Expression) (Expression, int) + func NextSegment(e Expression, start, end string) (Expression, int) + func ProcedureBody(expr Expression) (Expression, int) + func (e Expression) Advance(n int) Expression + func (e Expression) Rest() Expression + type Frame map[string]interface + func NewFrame(vars []string, vals []interface{}) Frame + type Procedure func(...interface{}) interface + func Primitive(app interface{}) Procedure