MCPcopy
hub / github.com/adonovan/gopl.io / Eval

Method Eval

ch7/eval/ast.go:9–9  ·  view source on GitHub ↗

Eval returns the value of this Expr in the environment env.

(env Env)

Source from the content-addressed store, hash-verified

7type Expr interface {
8 // Eval returns the value of this Expr in the environment env.
9 Eval(env Env) float64
10 // Check reports errors in this Expr and adds its Vars to the set.
11 Check(vars map[Var]bool) error
12}

Callers 6

plotFunction · 0.65
TestCoverageFunction · 0.65
TestEvalFunction · 0.65
EvalMethod · 0.65
EvalMethod · 0.65
EvalMethod · 0.65

Implementers 3

unarych7/eval/ast.go
binarych7/eval/ast.go
callch7/eval/ast.go

Calls

no outgoing calls

Tested by 2

TestCoverageFunction · 0.52
TestEvalFunction · 0.52