Documentation ¶
Index ¶
- func Add(vals ...float64) float64
- func Conditional(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Defn(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Div(vals ...float64) float64
- func Do(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Doc(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Eq(vals ...interface{}) bool
- func Eval(env parens.Scope) func(val interface{}) interface{}
- func Global(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Gt(lval, rval float64) bool
- func Inspect(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Label(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Lambda(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func Let(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func LoadFile(env parens.Scope) func(file string) interface{}
- func Lt(lval, rval float64) bool
- func Mul(vals ...float64) float64
- func Not(val interface{}) bool
- func Quote(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func RegisterAll(scope parens.Scope) error
- func RegisterCore(scope parens.Scope) error
- func RegisterIO(scope parens.Scope) error
- func RegisterMath(scope parens.Scope) error
- func RegisterSystem(scope parens.Scope) error
- func Sub(vals ...float64) float64
- func ThreadFirst(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
- func ThreadLast(scope parens.Scope, exprs []parens.Expr) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conditional ¶
Conditional is commonly know LISP (cond (test1 act1)...) construct. Tests can be any exressions that evaluate to non-nil and non-false value.
func Defn ¶
Defn macro is for defining named functions. It defines a lambda and binds it with the given name into the scope.
func Global ¶
Global binds the result of evaluating second argument to the symbol passed in as first argument in the global scope.
func Label ¶
Label binds the result of evaluating second argument to the symbol passed in as first argument in the current scope.
func Let ¶
Let creates a new sub-scope from the global scope and executes all the exprs inside the new scope. Once the Let block ends, all the names bound will be removed. In other words, Let is a Do with local scope.
func Not ¶
func Not(val interface{}) bool
Not returns true if val is nil or false value and false otherwise.
func RegisterAll ¶
RegisterAll registers different built-in functions into the given scope.
func RegisterCore ¶
RegisterCore binds all the core macros and functions into the scope.
func RegisterIO ¶
RegisterIO binds input/output functions into the scope.
func RegisterMath ¶
RegisterMath binds basic math operators into the scope.
func RegisterSystem ¶
RegisterSystem binds system functions into the scope.
func ThreadFirst ¶
ThreadFirst macro appends first evaluation result as first argument of next function call.
Types ¶
This section is empty.