Documentation ¶
Index ¶
- func BindAll(scope internal.Scope) error
- func Case(scope internal.Scope, args []internal.Value) (internal.Value, error)
- func Gt(base float64, args ...float64) bool
- func GtE(base float64, args ...float64) bool
- func Implements(v interface{}, t internal.Type) (bool, error)
- func Lt(base float64, args ...float64) bool
- func LtE(base float64, args ...float64) bool
- func MacroExpand(scope internal.Scope, f internal.Value) (internal.Value, error)
- func MakeString(vals ...internal.Value) internal.Value
- func Printf(format string, args ...interface{}) error
- func Println(args ...interface{}) error
- func Random(max int) int
- func Read(prompt string) (string, error)
- func ReadFile(name string) (string, error)
- func Realize(seq internal.Seq) *internal.List
- func Shell(command string) (*internal.HashMap, error)
- func Shuffle(seq internal.Seq) internal.Seq
- func ThreadFirst(scope internal.Scope, args []internal.Value) (internal.Value, error)
- func ThreadLast(scope internal.Scope, args []internal.Value) (internal.Value, error)
- func Throw(scope internal.Scope, args ...internal.Value) error
- func ToType(to internal.Type, val internal.Value) (internal.Value, error)
- func TypeOf(v interface{}) internal.Value
- type Any
- type Atom
- type Spirit
- func (spirit *Spirit) Bind(symbol string, v internal.Value) error
- func (spirit *Spirit) BindGo(symbol string, v interface{}) error
- func (spirit *Spirit) CurrentNS() string
- func (spirit *Spirit) Eval(v internal.Value) (internal.Value, error)
- func (spirit *Spirit) Parent() internal.Scope
- func (spirit *Spirit) ReadEval(r io.Reader) (internal.Value, error)
- func (spirit *Spirit) ReadEvalStr(src string) (internal.Value, error)
- func (spirit *Spirit) Resolve(symbol string) (internal.Value, error)
- func (spirit *Spirit) SwitchNS(sym internal.Symbol) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Implements ¶
Implements checks if given value implements the interface represented by 't'. Returns error if 't' does not represent an interface type.
func MacroExpand ¶
MacroExpand is a wrapper around the internal MacroExpand function that ignores the expanded bool flag.
func MakeString ¶
MakeString returns stringified version of all args.
func Println ¶
func Println(args ...interface{}) error
Println is an alias for fmt.Println which ignores the return values.
func Realize ¶
Realize realizes a sequence by continuously calling First() and Next() until the sequence becomes nil.
func ThreadFirst ¶
ThreadFirst threads the expressions through forms by inserting result of eval as first argument to next expr.
func ThreadLast ¶
ThreadLast threads the expressions through forms by inserting result of eval as last argument to next expr.
Types ¶
type Any ¶
type Any interface{}
type Spirit ¶
type Spirit struct {
// contains filtered or unexported fields
}
Spirit instance
func (*Spirit) Bind ¶
Bind binds the given name to the given Value into the spirit interpreter context.
func (*Spirit) BindGo ¶
BindGo is similar to Bind but handles conversion of Go value 'v' to internal Value type.
func (*Spirit) ReadEval ¶
ReadEval reads from the given reader and evaluates all the forms obtained in spirit context.
func (*Spirit) ReadEvalStr ¶
ReadEvalStr reads the source and evaluates it in spirit context.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package sabre provides data structures, reader for reading LISP source into data structures and functions for evluating forms against a context.
|
Package sabre provides data structures, reader for reading LISP source into data structures and functions for evluating forms against a context. |
repl
Package repl provides a REPL implementation and options to expose internal features through a read-eval-print-loop.
|
Package repl provides a REPL implementation and options to expose internal features through a read-eval-print-loop. |