Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eval ¶
func Eval(x Expression, env Environment) (Expression, Environment, error)
Eval evaluates a Lisp Expression in an Environment.
func Interactive ¶
Interactive launches an interactive lisp prompt.
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
An Environment binds variable names to their values.
func StdEnv ¶
func StdEnv() Environment
StdEnv returns an Environment which binds variable names for the standard, primitive values (like `+` and `-`).
type Expression ¶
type Expression interface { // String returns a readable Lisp string representing the Expression. String() string }
An Expression is a List or an Atom. Lisp proceeds by evaluating Expressions.
func Parse ¶
func Parse(program string) (Expression, error)
Parse tries to read a string into a Lisp
Click to show internal directories.
Click to hide internal directories.