lisp

package
v0.0.0-...-d4e75df Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

Eval evaluates a Lisp Expression in an Environment.

func Interactive

func Interactive(prompt string) error

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

Jump to

Keyboard shortcuts

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