eval

package
v0.0.0-...-748bbab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(e Expr) string

Types

type Env

type Env map[Var]float64

type Expr

type Expr interface {
	Eval(env Env) float64
	Check(vars map[Var]bool) error
	String() string
}

func Parse

func Parse(input string) (_ Expr, err error)

type Var

type Var string

func (Var) Check

func (v Var) Check(vars map[Var]bool) error

func (Var) Eval

func (v Var) Eval(env Env) float64

func (Var) String

func (v Var) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL