core

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: EPL-1.0 Imports: 28 Imported by: 12

Documentation

Index

Constants

View Source
const (
	INTEGER_CATEGORY  = iota
	FLOATING_CATEGORY = iota
	RATIO_CATEGORY    = iota
)
View Source
const (
	LITERAL_EXPR   = 1
	VECTOR_EXPR    = 2
	MAP_EXPR       = 3
	SET_EXPR       = 4
	IF_EXPR        = 5
	DEF_EXPR       = 6
	CALL_EXPR      = 7
	RECUR_EXPR     = 8
	META_EXPR      = 9
	DO_EXPR        = 10
	FN_ARITY_EXPR  = 11
	FN_EXPR        = 12
	LET_EXPR       = 13
	THROW_EXPR     = 14
	CATCH_EXPR     = 15
	TRY_EXPR       = 16
	VARREF_EXPR    = 17
	BINDING_EXPR   = 18
	LOOP_EXPR      = 19
	SET_MACRO_EXPR = 20
	NULL           = 100
	NOT_NULL       = 101
	SYMBOL_OBJ     = 102
	VAR_OBJ        = 103
	TYPE_OBJ       = 104
)
View Source
const EOF = -1
View Source
const KeywordHashMask uint32 = 0x7334c790
View Source
const MAX_RUNE = int(^uint32(0) >> 1)
View Source
const MIN_RUNE = -MAX_RUNE - 1
View Source
const VERSION = "v1.3.5"

Variables

View Source
var (
	Stdin          io.Reader = os.Stdin
	Stdout         io.Writer = os.Stdout
	Stderr         io.Writer = os.Stderr
	VerbosityLevel           = 0
)
View Source
var (
	INT_OPS      = IntOps{}
	DOUBLE_OPS   = DoubleOps{}
	BIGINT_OPS   = BigIntOps{}
	BIGFLOAT_OPS = BigFloatOps{}
	RATIO_OPS    = RatioOps{}
)
View Source
var (
	LOCAL_BINDINGS *Bindings = nil
	KNOWN_MACROS   *Var
	REQUIRE_VAR    *Var
	ALIAS_VAR      *Var
	REFER_VAR      *Var
	CREATE_NS_VAR  *Var
	IN_NS_VAR      *Var
	WARNINGS       = Warnings{
					// contains filtered or unexported fields
	}
)
View Source
var (
	LINTER_MODE   bool = false
	FORMAT_MODE   bool = false
	PROBLEM_COUNT      = 0
	DIALECT       Dialect
	LINTER_CONFIG *Var
	SUPPRESS_READ bool = false
)
View Source
var (
	ARGS   map[int]Symbol
	GENSYM int
)
View Source
var (
	EmptyHashMap = &HashMap{}
)
View Source
var EmptyList = NewList(Nil{}, nil)
View Source
var (
	HASHMAP_THRESHOLD int64 = 16
)
View Source
var NIL = Nil{}
View Source
var (
	VECTOR_THRESHOLD int = 16
)

Functions

func AreCountedIndexedEqual added in v1.3.0

func AreCountedIndexedEqual(v1, v2 CountedIndexed) bool

func CheckArity

func CheckArity(args []Object, min int, max int)

func CompareNumbers

func CompareNumbers(x Number, y Number) int

func CountedIndexedCompare added in v1.3.0

func CountedIndexedCompare(v1, v2 CountedIndexed) int

func CountedIndexedFormat added in v1.3.0

func CountedIndexedFormat(v CountedIndexed, w io.Writer, indent int) int

func CountedIndexedHash added in v1.3.0

func CountedIndexedHash(v CountedIndexed) uint32

func CountedIndexedPprint added in v1.3.0

func CountedIndexedPprint(v CountedIndexed, w io.Writer, indent int) int

func CountedIndexedToString added in v1.3.0

func CountedIndexedToString(v CountedIndexed, escape bool) string

func EnableIdentValidation

func EnableIdentValidation()

func EnsureArgIsio_Reader

func EnsureArgIsio_Reader(args []Object, index int) io.Reader

func EnsureArgIsio_RuneReader

func EnsureArgIsio_RuneReader(args []Object, index int) io.RuneReader

func EnsureArgIsio_Writer

func EnsureArgIsio_Writer(args []Object, index int) io.Writer

func EnsureObjectIsInts

func EnsureObjectIsInts(args []Object) (Int, Int)

func EnsureObjectIsio_Reader

func EnsureObjectIsio_Reader(obj Object, pattern string) io.Reader

func EnsureObjectIsio_RuneReader

func EnsureObjectIsio_RuneReader(obj Object, pattern string) io.RuneReader

func EnsureObjectIsio_Writer

func EnsureObjectIsio_Writer(obj Object, pattern string) io.Writer

func ExitJoker

func ExitJoker(rc int)

func ExtractBigFloat added in v0.17.1

func ExtractBigFloat(args []Object, index int) *big.Float

func ExtractBigInt added in v0.17.1

func ExtractBigInt(args []Object, index int) *big.Int

func ExtractBoolean

func ExtractBoolean(args []Object, index int) bool

func ExtractChar

func ExtractChar(args []Object, index int) rune

func ExtractDouble

func ExtractDouble(args []Object, index int) float64

func ExtractIOReader

func ExtractIOReader(args []Object, index int) io.Reader

func ExtractIOWriter

func ExtractIOWriter(args []Object, index int) io.Writer

func ExtractInt

func ExtractInt(args []Object, index int) int

func ExtractInteger

func ExtractInteger(args []Object, index int) int

func ExtractKeyword

func ExtractKeyword(args []Object, index int) string

func ExtractRegex

func ExtractRegex(args []Object, index int) *regexp.Regexp

func ExtractString

func ExtractString(args []Object, index int) string

func ExtractStringable

func ExtractStringable(args []Object, index int) string

func ExtractStrings

func ExtractStrings(args []Object, index int) []string

func ExtractTime

func ExtractTime(args []Object, index int) time.Time

func HashPtr

func HashPtr(ptr uintptr) uint32

func HomeDir

func HomeDir() string

func IsEqualOrImplements

func IsEqualOrImplements(abstractType *Type, concreteType *Type) bool

func IsInstance

func IsInstance(t *Type, obj Object) bool

func IsKeyword

func IsKeyword(obj Object) bool

func IsSeq

func IsSeq(obj Object) bool

func IsSeqEqual

func IsSeqEqual(seq Seq, other interface{}) bool

func IsSpecialSymbol

func IsSpecialSymbol(obj Object) bool

func IsSymbol

func IsSymbol(obj Object) bool

func IsVector

func IsVector(obj Object) bool

func MakeMathBigIntFromInt added in v0.17.1

func MakeMathBigIntFromInt(i int) *big.Int

Helper function that returns a math/big.Int given an int.

func MakeMathBigIntFromInt64 added in v0.17.1

func MakeMathBigIntFromInt64(i int64) *big.Int

Helper function that returns a math/big.Int given an int64.

func MakeMathBigIntFromUint added in v0.17.1

func MakeMathBigIntFromUint(b uint) *big.Int

Helper function that returns a math/big.Int given a uint.

func MakeMathBigIntFromUint64 added in v0.17.1

func MakeMathBigIntFromUint64(b uint64) *big.Int

Helper function that returns a math/big.Int given a uint64.

func OnExit

func OnExit(f func())

func PackExprOrNull

func PackExprOrNull(expr Expr, p []byte, env *PackEnv) []byte

func PackObjectOrNull

func PackObjectOrNull(obj Object, p []byte, env *PackEnv) []byte

func PackReader

func PackReader(reader *Reader, filename string) ([]byte, error)

func PanicArity

func PanicArity(n int)

func PanicArityMinMax

func PanicArityMinMax(n, min, max int)

func PanicOnErr

func PanicOnErr(err error)

func PrintObject

func PrintObject(obj Object, w io.Writer)

func ProcessCoreData

func ProcessCoreData()

func ProcessLinterData

func ProcessLinterData(dialect Dialect)

func ProcessLinterFile

func ProcessLinterFile(configDir string, filename string)

func ProcessLinterFiles

func ProcessLinterFiles(dialect Dialect, filename string, workingDir string)

func ProcessReader

func ProcessReader(reader *Reader, filename string, phase Phase) error

func ProcessReaderFromEval

func ProcessReaderFromEval(reader *Reader, filename string)

func ProcessReplData

func ProcessReplData()

func ReadConfig

func ReadConfig(filename string, workingDir string)

func RemoveJokerNamespaces added in v0.17.2

func RemoveJokerNamespaces()

func ResetUsage

func ResetUsage()

func SeqCount

func SeqCount(seq Seq) int

func SeqToString

func SeqToString(seq Seq, escape bool) string

func SeqsEqual

func SeqsEqual(seq1, seq2 Seq) bool

func SetIdentRangeASCII

func SetIdentRangeASCII()

func SetIdentRangeAny

func SetIdentRangeAny()

func SetIdentRangeUnicode

func SetIdentRangeUnicode()

func SetIdentSetAny

func SetIdentSetAny()

func SetIdentSetCore

func SetIdentSetCore()

func SetIdentSetSymbol

func SetIdentSetSymbol()

func SetIdentSetVisible

func SetIdentSetVisible()

func ToBool

func ToBool(obj Object) bool

func ToNative added in v0.17.0

func ToNative(obj Object) interface{}

Convert Joker object to native Go object. For those satisfying the Native type, that's straightforward. For other Joker objects, try converting them to suitable native Go objects. E.g. a BigInt might hold a value > MaxInt64 but < MaxUint64, in which case conversion to a uint64 makes more sense than returning the stringized version, for use cases such as `(format "%x" value)`. Even for BigFloat and BigRat, try to (accurately) convert them to native types so they can be formatted via the usual ways.

func WarnOnGloballyUnusedNamespaces

func WarnOnGloballyUnusedNamespaces()

func WarnOnGloballyUnusedVars

func WarnOnGloballyUnusedVars()

func WarnOnUnusedNamespaces

func WarnOnUnusedNamespaces()

func WarnOnUnusedVars

func WarnOnUnusedVars()

Types

type ArrayMap

type ArrayMap struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EmptyArrayMap

func EmptyArrayMap() *ArrayMap

func MakeMeta

func MakeMeta(arglists Seq, docstring string, added string) *ArrayMap

func (*ArrayMap) Add

func (m *ArrayMap) Add(key Object, value Object) bool

func (*ArrayMap) Assoc

func (m *ArrayMap) Assoc(key Object, value Object) Associative

func (*ArrayMap) Call

func (m *ArrayMap) Call(args []Object) Object

func (*ArrayMap) Clone

func (m *ArrayMap) Clone() *ArrayMap

func (*ArrayMap) Conj

func (m *ArrayMap) Conj(obj Object) Conjable

func (*ArrayMap) Count

func (m *ArrayMap) Count() int

func (*ArrayMap) Empty

func (m *ArrayMap) Empty() Collection

func (*ArrayMap) EntryAt

func (m *ArrayMap) EntryAt(key Object) *ArrayVector

func (*ArrayMap) Equals

func (m *ArrayMap) Equals(other interface{}) bool

func (*ArrayMap) Format

func (m *ArrayMap) Format(w io.Writer, indent int) int

func (*ArrayMap) Get

func (m *ArrayMap) Get(key Object) (bool, Object)

func (*ArrayMap) GetType

func (m *ArrayMap) GetType() *Type

func (*ArrayMap) Hash

func (m *ArrayMap) Hash() uint32

func (*ArrayMap) Iter

func (m *ArrayMap) Iter() MapIterator

func (*ArrayMap) Keys

func (m *ArrayMap) Keys() Seq

func (*ArrayMap) Merge

func (m *ArrayMap) Merge(other Map) Map

func (*ArrayMap) Plus

func (m *ArrayMap) Plus(key Object, value Object) *ArrayMap

func (*ArrayMap) Pprint

func (m *ArrayMap) Pprint(w io.Writer, indent int) int

func (*ArrayMap) Seq

func (m *ArrayMap) Seq() Seq

func (*ArrayMap) Set

func (m *ArrayMap) Set(key Object, value Object)

func (*ArrayMap) ToString

func (m *ArrayMap) ToString(escape bool) string

func (*ArrayMap) Vals

func (m *ArrayMap) Vals() Seq

func (*ArrayMap) WithInfo

func (x *ArrayMap) WithInfo(info *ObjectInfo) Object

func (*ArrayMap) WithMeta

func (v *ArrayMap) WithMeta(meta Map) Object

func (*ArrayMap) Without

func (m *ArrayMap) Without(key Object) Map

type ArrayMapIterator

type ArrayMapIterator struct {
	// contains filtered or unexported fields
}

func (*ArrayMapIterator) HasNext

func (iter *ArrayMapIterator) HasNext() bool

func (*ArrayMapIterator) Next

func (iter *ArrayMapIterator) Next() *Pair

type ArrayMapSeq

type ArrayMapSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*ArrayMapSeq) Cons

func (seq *ArrayMapSeq) Cons(obj Object) Seq

func (*ArrayMapSeq) Equals

func (seq *ArrayMapSeq) Equals(other interface{}) bool

func (*ArrayMapSeq) First

func (seq *ArrayMapSeq) First() Object

func (*ArrayMapSeq) Format

func (seq *ArrayMapSeq) Format(w io.Writer, indent int) int

func (*ArrayMapSeq) GetType

func (seq *ArrayMapSeq) GetType() *Type

func (*ArrayMapSeq) Hash

func (seq *ArrayMapSeq) Hash() uint32

func (*ArrayMapSeq) IsEmpty

func (seq *ArrayMapSeq) IsEmpty() bool

func (*ArrayMapSeq) Pprint

func (seq *ArrayMapSeq) Pprint(w io.Writer, indent int) int

func (*ArrayMapSeq) Rest

func (seq *ArrayMapSeq) Rest() Seq

func (*ArrayMapSeq) Seq

func (seq *ArrayMapSeq) Seq() Seq

func (*ArrayMapSeq) ToString

func (seq *ArrayMapSeq) ToString(escape bool) string

func (*ArrayMapSeq) WithInfo

func (x *ArrayMapSeq) WithInfo(info *ObjectInfo) Object

func (*ArrayMapSeq) WithMeta

func (seq *ArrayMapSeq) WithMeta(meta Map) Object

type ArrayNode

type ArrayNode struct {
	// contains filtered or unexported fields
}

type ArrayNodeIterator

type ArrayNodeIterator struct {
	// contains filtered or unexported fields
}

func (*ArrayNodeIterator) HasNext

func (iter *ArrayNodeIterator) HasNext() bool

func (*ArrayNodeIterator) Next

func (iter *ArrayNodeIterator) Next() *Pair

type ArrayNodeSeq

type ArrayNodeSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*ArrayNodeSeq) Cons

func (s *ArrayNodeSeq) Cons(obj Object) Seq

func (*ArrayNodeSeq) Equals

func (s *ArrayNodeSeq) Equals(other interface{}) bool

func (*ArrayNodeSeq) First

func (s *ArrayNodeSeq) First() Object

func (*ArrayNodeSeq) Format

func (seq *ArrayNodeSeq) Format(w io.Writer, indent int) int

func (*ArrayNodeSeq) GetType

func (s *ArrayNodeSeq) GetType() *Type

func (*ArrayNodeSeq) Hash

func (s *ArrayNodeSeq) Hash() uint32

func (*ArrayNodeSeq) IsEmpty

func (s *ArrayNodeSeq) IsEmpty() bool

func (*ArrayNodeSeq) Pprint

func (seq *ArrayNodeSeq) Pprint(w io.Writer, indent int) int

func (*ArrayNodeSeq) Rest

func (s *ArrayNodeSeq) Rest() Seq

func (*ArrayNodeSeq) Seq

func (s *ArrayNodeSeq) Seq() Seq

func (*ArrayNodeSeq) ToString

func (s *ArrayNodeSeq) ToString(escape bool) string

func (*ArrayNodeSeq) WithInfo

func (x *ArrayNodeSeq) WithInfo(info *ObjectInfo) Object

func (*ArrayNodeSeq) WithMeta

func (s *ArrayNodeSeq) WithMeta(meta Map) Object

type ArraySeq

type ArraySeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func ArraySeqFromArrayMap

func ArraySeqFromArrayMap(m *ArrayMap) *ArraySeq

func (*ArraySeq) Cons

func (seq *ArraySeq) Cons(obj Object) Seq

func (*ArraySeq) Equals

func (seq *ArraySeq) Equals(other interface{}) bool

func (*ArraySeq) First

func (seq *ArraySeq) First() Object

func (*ArraySeq) Format

func (seq *ArraySeq) Format(w io.Writer, indent int) int

func (*ArraySeq) GetType

func (seq *ArraySeq) GetType() *Type

func (*ArraySeq) Hash

func (seq *ArraySeq) Hash() uint32

func (*ArraySeq) IsEmpty

func (seq *ArraySeq) IsEmpty() bool

func (*ArraySeq) Pprint

func (seq *ArraySeq) Pprint(w io.Writer, indent int) int

func (*ArraySeq) Rest

func (seq *ArraySeq) Rest() Seq

func (*ArraySeq) Seq

func (seq *ArraySeq) Seq() Seq

func (*ArraySeq) ToString

func (seq *ArraySeq) ToString(escape bool) string

func (*ArraySeq) WithInfo

func (x *ArraySeq) WithInfo(info *ObjectInfo) Object

func (*ArraySeq) WithMeta

func (seq *ArraySeq) WithMeta(meta Map) Object

type ArrayVector added in v1.3.0

type ArrayVector struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EmptyArrayVector added in v1.3.0

func EmptyArrayVector() *ArrayVector

func MakeIntVector added in v0.17.0

func MakeIntVector(ii []int) *ArrayVector

func MakeStringVector

func MakeStringVector(ss []string) *ArrayVector

func NewArrayVectorFrom added in v1.3.0

func NewArrayVectorFrom(objs ...Object) *ArrayVector

func (*ArrayVector) Append added in v1.3.0

func (v *ArrayVector) Append(obj Object)

func (*ArrayVector) Assoc added in v1.3.0

func (v *ArrayVector) Assoc(key, val Object) Associative

func (*ArrayVector) At added in v1.3.0

func (v *ArrayVector) At(i int) Object

func (*ArrayVector) Call added in v1.3.0

func (v *ArrayVector) Call(args []Object) Object

func (*ArrayVector) Clone added in v1.3.0

func (v *ArrayVector) Clone() *ArrayVector

func (*ArrayVector) Compare added in v1.3.0

func (v *ArrayVector) Compare(other Object) int

func (*ArrayVector) Conj added in v1.3.0

func (v *ArrayVector) Conj(obj Object) Conjable

func (*ArrayVector) Conjoin added in v1.3.0

func (v *ArrayVector) Conjoin(obj Object) Vec

func (*ArrayVector) Count added in v1.3.0

func (v *ArrayVector) Count() int

func (*ArrayVector) Empty added in v1.3.0

func (v *ArrayVector) Empty() Collection

func (*ArrayVector) EntryAt added in v1.3.0

func (v *ArrayVector) EntryAt(key Object) *ArrayVector

func (*ArrayVector) Equals added in v1.3.0

func (v *ArrayVector) Equals(other interface{}) bool

func (*ArrayVector) Format added in v1.3.0

func (v *ArrayVector) Format(w io.Writer, indent int) int

func (*ArrayVector) Get added in v1.3.0

func (v *ArrayVector) Get(key Object) (bool, Object)

func (*ArrayVector) GetType added in v1.3.0

func (v *ArrayVector) GetType() *Type

func (*ArrayVector) Hash added in v1.3.0

func (v *ArrayVector) Hash() uint32

func (*ArrayVector) Nth added in v1.3.0

func (v *ArrayVector) Nth(i int) Object

func (*ArrayVector) Peek added in v1.3.0

func (v *ArrayVector) Peek() Object

func (*ArrayVector) Pop added in v1.3.0

func (v *ArrayVector) Pop() Stack

func (*ArrayVector) Pprint added in v1.3.0

func (v *ArrayVector) Pprint(w io.Writer, indent int) int

func (*ArrayVector) Rseq added in v1.3.0

func (v *ArrayVector) Rseq() Seq

func (*ArrayVector) Seq added in v1.3.0

func (v *ArrayVector) Seq() Seq

func (*ArrayVector) ToString added in v1.3.0

func (v *ArrayVector) ToString(escape bool) string

func (*ArrayVector) TryNth added in v1.3.0

func (v *ArrayVector) TryNth(i int, d Object) Object

func (*ArrayVector) WithInfo added in v1.3.0

func (x *ArrayVector) WithInfo(info *ObjectInfo) Object

func (*ArrayVector) WithMeta added in v1.3.0

func (v *ArrayVector) WithMeta(meta Map) Object

type Associative

type Associative interface {
	Conjable
	Gettable
	EntryAt(key Object) *ArrayVector
	Assoc(key, val Object) Associative
}

func EnsureArgIsAssociative

func EnsureArgIsAssociative(args []Object, index int) Associative

func EnsureObjectIsAssociative

func EnsureObjectIsAssociative(obj Object, pattern string) Associative

type Atom

type Atom struct {
	MetaHolder
	// contains filtered or unexported fields
}

func EnsureArgIsAtom

func EnsureArgIsAtom(args []Object, index int) *Atom

func EnsureObjectIsAtom

func EnsureObjectIsAtom(obj Object, pattern string) *Atom

func (*Atom) AlterMeta

func (a *Atom) AlterMeta(fn *Fn, args []Object) Map

func (*Atom) Deref

func (a *Atom) Deref() Object

func (*Atom) Equals

func (a *Atom) Equals(other interface{}) bool

func (*Atom) GetInfo

func (a *Atom) GetInfo() *ObjectInfo

func (*Atom) GetType

func (a *Atom) GetType() *Type

func (*Atom) Hash

func (a *Atom) Hash() uint32

func (*Atom) ResetMeta

func (a *Atom) ResetMeta(newMeta Map) Map

func (*Atom) ToString

func (a *Atom) ToString(escape bool) string

func (*Atom) WithInfo

func (a *Atom) WithInfo(info *ObjectInfo) Object

func (*Atom) WithMeta

func (a *Atom) WithMeta(meta Map) Object

type BigFloat

type BigFloat struct {
	InfoHolder

	Original string
	// contains filtered or unexported fields
}

func EnsureArgIsBigFloat added in v0.17.1

func EnsureArgIsBigFloat(args []Object, index int) *BigFloat

func EnsureObjectIsBigFloat added in v0.17.1

func EnsureObjectIsBigFloat(obj Object, pattern string) *BigFloat

func MakeBigFloat added in v0.17.1

func MakeBigFloat(b *big.Float) *BigFloat

func MakeBigFloatWithOrig added in v0.17.1

func MakeBigFloatWithOrig(s, orig string) (*BigFloat, bool)

Helper function that returns a BigFloat given a string, remembering any original string provided, and true if the string had the proper format; nil and false otherwise.

func (*BigFloat) BigFloat

func (b *BigFloat) BigFloat() *big.Float

func (*BigFloat) BigInt

func (b *BigFloat) BigInt() *big.Int

func (*BigFloat) Compare

func (bf *BigFloat) Compare(other Object) int

func (*BigFloat) Double

func (b *BigFloat) Double() Double

func (*BigFloat) Equals

func (bf *BigFloat) Equals(other interface{}) bool

func (*BigFloat) GetType

func (bf *BigFloat) GetType() *Type

func (*BigFloat) Hash

func (bf *BigFloat) Hash() uint32

func (*BigFloat) Int

func (b *BigFloat) Int() Int

func (*BigFloat) Precision added in v0.17.1

func (n *BigFloat) Precision() *big.Int

func (*BigFloat) Ratio

func (b *BigFloat) Ratio() *big.Rat

func (*BigFloat) ToString

func (bf *BigFloat) ToString(escape bool) string

func (*BigFloat) WithInfo

func (x *BigFloat) WithInfo(info *ObjectInfo) Object

type BigFloatOps

type BigFloatOps struct{}

func (BigFloatOps) Add

func (ops BigFloatOps) Add(x, y Number) Number

func (BigFloatOps) Combine

func (ops BigFloatOps) Combine(other Ops) Ops

func (BigFloatOps) Divide

func (ops BigFloatOps) Divide(x, y Number) Number

func (BigFloatOps) Eq

func (ops BigFloatOps) Eq(x Number, y Number) bool

func (BigFloatOps) Gt

func (ops BigFloatOps) Gt(x Number, y Number) bool

func (BigFloatOps) Gte

func (ops BigFloatOps) Gte(x Number, y Number) bool

func (BigFloatOps) IsZero

func (ops BigFloatOps) IsZero(x Number) bool

func (BigFloatOps) Lt

func (ops BigFloatOps) Lt(x Number, y Number) bool

func (BigFloatOps) Lte

func (ops BigFloatOps) Lte(x Number, y Number) bool

func (BigFloatOps) Multiply

func (ops BigFloatOps) Multiply(x, y Number) Number

func (BigFloatOps) Quotient

func (ops BigFloatOps) Quotient(x, y Number) Number

func (BigFloatOps) Rem

func (ops BigFloatOps) Rem(x, y Number) Number

func (BigFloatOps) Subtract

func (ops BigFloatOps) Subtract(x, y Number) Number

type BigInt

type BigInt struct {
	InfoHolder

	Original string
	// contains filtered or unexported fields
}

func EnsureArgIsBigInt added in v0.17.1

func EnsureArgIsBigInt(args []Object, index int) *BigInt

func EnsureObjectIsBigInt added in v0.17.1

func EnsureObjectIsBigInt(obj Object, pattern string) *BigInt

func MakeBigInt

func MakeBigInt(b *big.Int) *BigInt

func (*BigInt) BigFloat

func (b *BigInt) BigFloat() *big.Float

func (*BigInt) BigInt

func (b *BigInt) BigInt() *big.Int

func (*BigInt) Compare

func (bi *BigInt) Compare(other Object) int

func (*BigInt) Double

func (b *BigInt) Double() Double

func (*BigInt) Equals

func (bi *BigInt) Equals(other interface{}) bool

func (*BigInt) GetType

func (bi *BigInt) GetType() *Type

func (*BigInt) Hash

func (bi *BigInt) Hash() uint32

func (*BigInt) Int

func (b *BigInt) Int() Int

func (*BigInt) Precision added in v0.17.1

func (n *BigInt) Precision() *big.Int

func (*BigInt) Ratio

func (b *BigInt) Ratio() *big.Rat

func (*BigInt) ToString

func (bi *BigInt) ToString(escape bool) string

func (*BigInt) WithInfo

func (x *BigInt) WithInfo(info *ObjectInfo) Object

type BigIntOps

type BigIntOps struct{}

func (BigIntOps) Add

func (ops BigIntOps) Add(x, y Number) Number

func (BigIntOps) Combine

func (ops BigIntOps) Combine(other Ops) Ops

func (BigIntOps) Divide

func (ops BigIntOps) Divide(x, y Number) Number

func (BigIntOps) Eq

func (ops BigIntOps) Eq(x Number, y Number) bool

func (BigIntOps) Gt

func (ops BigIntOps) Gt(x Number, y Number) bool

func (BigIntOps) Gte

func (ops BigIntOps) Gte(x Number, y Number) bool

func (BigIntOps) IsZero

func (ops BigIntOps) IsZero(x Number) bool

func (BigIntOps) Lt

func (ops BigIntOps) Lt(x Number, y Number) bool

func (BigIntOps) Lte

func (ops BigIntOps) Lte(x Number, y Number) bool

func (BigIntOps) Multiply

func (ops BigIntOps) Multiply(x, y Number) Number

func (BigIntOps) Quotient

func (ops BigIntOps) Quotient(x, y Number) Number

func (BigIntOps) Rem

func (ops BigIntOps) Rem(x, y Number) Number

func (BigIntOps) Subtract

func (ops BigIntOps) Subtract(x, y Number) Number

type Binding

type Binding struct {
	// contains filtered or unexported fields
}

func (*Binding) Pack

func (b *Binding) Pack(p []byte, env *PackEnv) []byte

type BindingExpr

type BindingExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*BindingExpr) Dump

func (expr *BindingExpr) Dump(pos bool) Map

func (*BindingExpr) Eval

func (expr *BindingExpr) Eval(env *LocalEnv) Object

func (*BindingExpr) InferType

func (expr *BindingExpr) InferType() *Type

func (*BindingExpr) Pack

func (expr *BindingExpr) Pack(p []byte, env *PackEnv) []byte

type Bindings

type Bindings struct {
	// contains filtered or unexported fields
}

func (*Bindings) AddBinding

func (b *Bindings) AddBinding(sym Symbol, index int, skipUnused bool, inferredType *Type)

func (*Bindings) GetBinding

func (b *Bindings) GetBinding(sym Symbol) *Binding

func (*Bindings) PopFrame

func (b *Bindings) PopFrame() *Bindings

func (*Bindings) PushFrame

func (b *Bindings) PushFrame() *Bindings

func (*Bindings) ToMap

func (b *Bindings) ToMap() Map

type BitmapIndexedNode

type BitmapIndexedNode struct {
	// contains filtered or unexported fields
}

type Boolean

type Boolean struct {
	InfoHolder
	B bool
}

func EnsureArgIsBoolean

func EnsureArgIsBoolean(args []Object, index int) Boolean

func EnsureObjectIsBoolean

func EnsureObjectIsBoolean(obj Object, pattern string) Boolean

func MakeBoolean

func MakeBoolean(b bool) Boolean

func (Boolean) Compare

func (b Boolean) Compare(other Object) int

func (Boolean) Equals

func (b Boolean) Equals(other interface{}) bool

func (Boolean) GetType

func (b Boolean) GetType() *Type

func (Boolean) Hash

func (b Boolean) Hash() uint32

func (Boolean) Native

func (b Boolean) Native() interface{}

func (Boolean) ToString

func (b Boolean) ToString(escape bool) string

func (Boolean) WithInfo

func (x Boolean) WithInfo(info *ObjectInfo) Object

type Box

type Box struct {
	// contains filtered or unexported fields
}

type Buffer

type Buffer struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func MakeBuffer

func MakeBuffer(b *bytes.Buffer) *Buffer

func (*Buffer) Equals

func (b *Buffer) Equals(other interface{}) bool

func (*Buffer) GetInfo

func (b *Buffer) GetInfo() *ObjectInfo

func (*Buffer) GetType

func (b *Buffer) GetType() *Type

func (*Buffer) Hash

func (b *Buffer) Hash() uint32

func (*Buffer) ToString

func (b *Buffer) ToString(escape bool) string

func (*Buffer) WithInfo

func (b *Buffer) WithInfo(info *ObjectInfo) Object

type BufferedReader

type BufferedReader struct {
	*bufio.Reader
	// contains filtered or unexported fields
}

func MakeBufferedReader

func MakeBufferedReader(rd io.Reader) *BufferedReader

func (*BufferedReader) Equals

func (br *BufferedReader) Equals(other interface{}) bool

func (*BufferedReader) GetInfo

func (br *BufferedReader) GetInfo() *ObjectInfo

func (*BufferedReader) GetType

func (br *BufferedReader) GetType() *Type

func (*BufferedReader) Hash

func (br *BufferedReader) Hash() uint32

func (*BufferedReader) ToString

func (br *BufferedReader) ToString(escape bool) string

func (*BufferedReader) WithInfo

func (br *BufferedReader) WithInfo(info *ObjectInfo) Object

type BySymbolName

type BySymbolName []Symbol

func (BySymbolName) Len

func (s BySymbolName) Len() int

func (BySymbolName) Less

func (s BySymbolName) Less(i, j int) bool

func (BySymbolName) Swap

func (s BySymbolName) Swap(i, j int)

type CallExpr

type CallExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*CallExpr) Dump

func (expr *CallExpr) Dump(pos bool) Map

func (*CallExpr) Eval

func (expr *CallExpr) Eval(env *LocalEnv) Object

func (*CallExpr) InferType

func (expr *CallExpr) InferType() *Type

func (*CallExpr) Name

func (expr *CallExpr) Name() string

func (*CallExpr) Pack

func (expr *CallExpr) Pack(p []byte, env *PackEnv) []byte

type Callable

type Callable interface {
	Call(args []Object) Object
}

func EnsureArgIsCallable

func EnsureArgIsCallable(args []Object, index int) Callable

func EnsureObjectIsCallable

func EnsureObjectIsCallable(obj Object, pattern string) Callable

func ExtractCallable

func ExtractCallable(args []Object, index int) Callable

type Callstack

type Callstack struct {
	// contains filtered or unexported fields
}

func (*Callstack) String

func (s *Callstack) String() string

type CatchExpr

type CatchExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*CatchExpr) Dump

func (expr *CatchExpr) Dump(pos bool) Map

func (*CatchExpr) Eval

func (expr *CatchExpr) Eval(env *LocalEnv) (obj Object)

func (*CatchExpr) InferType

func (expr *CatchExpr) InferType() *Type

func (*CatchExpr) Pack

func (expr *CatchExpr) Pack(p []byte, env *PackEnv) []byte

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func EnsureArgIsChannel

func EnsureArgIsChannel(args []Object, index int) *Channel

func EnsureObjectIsChannel

func EnsureObjectIsChannel(obj Object, pattern string) *Channel

func ExtractChannel

func ExtractChannel(args []Object, index int) *Channel

func MakeChannel

func MakeChannel(ch chan FutureResult) *Channel

func (*Channel) Close

func (ch *Channel) Close()

func (*Channel) Equals

func (ch *Channel) Equals(other interface{}) bool

func (*Channel) GetInfo

func (ch *Channel) GetInfo() *ObjectInfo

func (*Channel) GetType

func (ch *Channel) GetType() *Type

func (*Channel) Hash

func (ch *Channel) Hash() uint32

func (*Channel) ToString

func (ch *Channel) ToString(escape bool) string

func (*Channel) WithInfo

func (ch *Channel) WithInfo(info *ObjectInfo) Object

type Char

type Char struct {
	InfoHolder
	Ch rune
}

func EnsureArgIsChar

func EnsureArgIsChar(args []Object, index int) Char

func EnsureObjectIsChar

func EnsureObjectIsChar(obj Object, pattern string) Char

func MakeChar added in v1.3.0

func MakeChar(r rune) Char

func (Char) Compare

func (c Char) Compare(other Object) int

func (Char) Equals

func (c Char) Equals(other interface{}) bool

func (Char) GetType

func (c Char) GetType() *Type

func (Char) Hash

func (c Char) Hash() uint32

func (Char) Native

func (c Char) Native() interface{}

func (Char) ToString

func (c Char) ToString(escape bool) string

func (Char) WithInfo

func (x Char) WithInfo(info *ObjectInfo) Object

type Collection

type Collection interface {
	Object
	Counted
	Seqable
	Empty() Collection
}

type Comment

type Comment struct {
	InfoHolder
	C string
}

func (Comment) Equals

func (c Comment) Equals(other interface{}) bool

func (Comment) GetType

func (c Comment) GetType() *Type

func (Comment) Hash

func (c Comment) Hash() uint32

func (Comment) ToString

func (c Comment) ToString(escape bool) string

func (Comment) WithInfo

func (x Comment) WithInfo(info *ObjectInfo) Object

type Comparable

type Comparable interface {
	Compare(other Object) int
}

func EnsureArgIsComparable

func EnsureArgIsComparable(args []Object, index int) Comparable

func EnsureObjectIsComparable

func EnsureObjectIsComparable(obj Object, pattern string) Comparable

type Comparator

type Comparator interface {
	Compare(a, b Object) int
}

func EnsureArgIsComparator

func EnsureArgIsComparator(args []Object, index int) Comparator

func EnsureObjectIsComparator

func EnsureObjectIsComparator(obj Object, pattern string) Comparator

type Conjable

type Conjable interface {
	Object
	Conj(obj Object) Conjable
}

type ConsSeq

type ConsSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func NewConsSeq

func NewConsSeq(first Object, rest Seq) *ConsSeq

func (*ConsSeq) Cons

func (seq *ConsSeq) Cons(obj Object) Seq

func (*ConsSeq) Equals

func (seq *ConsSeq) Equals(other interface{}) bool

func (*ConsSeq) First

func (seq *ConsSeq) First() Object

func (*ConsSeq) Format

func (seq *ConsSeq) Format(w io.Writer, indent int) int

func (*ConsSeq) GetType

func (seq *ConsSeq) GetType() *Type

func (*ConsSeq) Hash

func (seq *ConsSeq) Hash() uint32

func (*ConsSeq) IsEmpty

func (seq *ConsSeq) IsEmpty() bool

func (*ConsSeq) Pprint

func (seq *ConsSeq) Pprint(w io.Writer, indent int) int

func (*ConsSeq) Rest

func (seq *ConsSeq) Rest() Seq

func (*ConsSeq) Seq

func (seq *ConsSeq) Seq() Seq

func (*ConsSeq) ToString

func (seq *ConsSeq) ToString(escape bool) string

func (*ConsSeq) WithInfo

func (x *ConsSeq) WithInfo(info *ObjectInfo) Object

func (*ConsSeq) WithMeta

func (seq *ConsSeq) WithMeta(meta Map) Object

type Counted

type Counted interface {
	Count() int
}

type CountedIndexed added in v1.3.0

type CountedIndexed interface {
	Counted
	At(int) Object
}

func EnsureArgIsCountedIndexed added in v1.3.0

func EnsureArgIsCountedIndexed(args []Object, index int) CountedIndexed

func EnsureObjectIsCountedIndexed added in v1.3.0

func EnsureObjectIsCountedIndexed(obj Object, pattern string) CountedIndexed

type DefExpr

type DefExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*DefExpr) Dump

func (expr *DefExpr) Dump(pos bool) Map

func (*DefExpr) Eval

func (expr *DefExpr) Eval(env *LocalEnv) Object

func (*DefExpr) InferType

func (expr *DefExpr) InferType() *Type

func (*DefExpr) Pack

func (expr *DefExpr) Pack(p []byte, env *PackEnv) []byte

type Delay

type Delay struct {
	// contains filtered or unexported fields
}

func (*Delay) Deref

func (d *Delay) Deref() Object

func (*Delay) Equals

func (d *Delay) Equals(other interface{}) bool

func (*Delay) Force

func (d *Delay) Force() Object

func (*Delay) GetInfo

func (d *Delay) GetInfo() *ObjectInfo

func (*Delay) GetType

func (d *Delay) GetType() *Type

func (*Delay) Hash

func (d *Delay) Hash() uint32

func (*Delay) IsRealized

func (d *Delay) IsRealized() bool

func (*Delay) ToString

func (d *Delay) ToString(escape bool) string

func (*Delay) WithInfo

func (d *Delay) WithInfo(info *ObjectInfo) Object

type Deref

type Deref interface {
	Deref() Object
}

func EnsureArgIsDeref

func EnsureArgIsDeref(args []Object, index int) Deref

func EnsureObjectIsDeref

func EnsureObjectIsDeref(obj Object, pattern string) Deref

type Dialect

type Dialect int
const (
	CLJ Dialect = iota
	CLJS
	JOKER
	EDN
	UNKNOWN
)

type DoExpr

type DoExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*DoExpr) Dump

func (expr *DoExpr) Dump(pos bool) Map

func (*DoExpr) Eval

func (doExpr *DoExpr) Eval(env *LocalEnv) Object

func (*DoExpr) InferType

func (expr *DoExpr) InferType() *Type

func (*DoExpr) Pack

func (expr *DoExpr) Pack(p []byte, env *PackEnv) []byte

type Double

type Double struct {
	InfoHolder
	D        float64
	Original string
}

func EnsureArgIsDouble

func EnsureArgIsDouble(args []Object, index int) Double

func EnsureObjectIsDouble

func EnsureObjectIsDouble(obj Object, pattern string) Double

func MakeDouble

func MakeDouble(d float64) Double

func (Double) BigFloat

func (d Double) BigFloat() *big.Float

func (Double) BigInt

func (d Double) BigInt() *big.Int

func (Double) Compare

func (d Double) Compare(other Object) int

func (Double) Double

func (d Double) Double() Double

func (Double) Equals

func (d Double) Equals(other interface{}) bool

func (Double) GetType

func (d Double) GetType() *Type

func (Double) Hash

func (d Double) Hash() uint32

func (Double) Int

func (d Double) Int() Int

func (Double) Native

func (d Double) Native() interface{}

func (Double) Precision added in v0.17.1

func (n Double) Precision() *big.Int

func (Double) Ratio

func (d Double) Ratio() *big.Rat

func (Double) ToString

func (d Double) ToString(escape bool) string

func (Double) WithInfo

func (x Double) WithInfo(info *ObjectInfo) Object

type DoubleOps

type DoubleOps struct{}

func (DoubleOps) Add

func (ops DoubleOps) Add(x, y Number) Number

func (DoubleOps) Combine

func (ops DoubleOps) Combine(other Ops) Ops

func (DoubleOps) Divide

func (ops DoubleOps) Divide(x, y Number) Number

func (DoubleOps) Eq

func (ops DoubleOps) Eq(x Number, y Number) bool

func (DoubleOps) Gt

func (ops DoubleOps) Gt(x Number, y Number) bool

func (DoubleOps) Gte

func (ops DoubleOps) Gte(x Number, y Number) bool

func (DoubleOps) IsZero

func (ops DoubleOps) IsZero(x Number) bool

func (DoubleOps) Lt

func (ops DoubleOps) Lt(x Number, y Number) bool

func (DoubleOps) Lte

func (ops DoubleOps) Lte(x Number, y Number) bool

func (DoubleOps) Multiply

func (ops DoubleOps) Multiply(x, y Number) Number

func (DoubleOps) Quotient

func (ops DoubleOps) Quotient(x, y Number) Number

func (DoubleOps) Rem

func (ops DoubleOps) Rem(x, y Number) Number

func (DoubleOps) Subtract

func (ops DoubleOps) Subtract(x, y Number) Number

type EmptyMapIterator

type EmptyMapIterator struct {
}

func (*EmptyMapIterator) HasNext

func (iter *EmptyMapIterator) HasNext() bool

func (*EmptyMapIterator) Next

func (iter *EmptyMapIterator) Next() *Pair

type Env

type Env struct {
	Namespaces    map[*string]*Namespace
	CoreNamespace *Namespace

	MainFile *Var

	NS_VAR    *Var
	IN_NS_VAR *Var

	Features Set
	// contains filtered or unexported fields
}

func (*Env) CurrentNamespace

func (env *Env) CurrentNamespace() *Namespace

func (*Env) EnsureSymbolIsLib

func (env *Env) EnsureSymbolIsLib(sym Symbol) *Namespace

func (*Env) EnsureSymbolIsNamespace

func (env *Env) EnsureSymbolIsNamespace(sym Symbol) *Namespace

func (*Env) FindNamespace

func (env *Env) FindNamespace(s Symbol) *Namespace

func (*Env) InitEnv

func (env *Env) InitEnv(stdin io.Reader, stdout, stderr io.Writer, args []string)

This runs after invariant initialization, which includes calling

NewEnv().  NOTE: Any changes to the list of run-time
initializations must be reflected in gen_code/gen_code.go.

func (*Env) IsStdIn

func (env *Env) IsStdIn(obj Object) bool

func (*Env) NamespaceFor

func (env *Env) NamespaceFor(ns *Namespace, s Symbol) *Namespace

func (*Env) ReferCoreToUser

func (env *Env) ReferCoreToUser()

func (*Env) RemoveNamespace

func (env *Env) RemoveNamespace(s Symbol) *Namespace

func (*Env) Resolve

func (env *Env) Resolve(s Symbol) (*Var, bool)

func (*Env) ResolveIn

func (env *Env) ResolveIn(n *Namespace, s Symbol) (*Var, bool)

func (*Env) ResolveSymbol

func (env *Env) ResolveSymbol(s Symbol) Symbol

func (*Env) SetClassPath

func (env *Env) SetClassPath(cp string)

This runs after invariant initialization, which includes calling

NewEnv().  NOTE: Any changes to the list of run-time
initializations must be reflected in gen_code/gen_code.go.

func (*Env) SetCurrentNamespace

func (env *Env) SetCurrentNamespace(ns *Namespace)

func (*Env) SetEnvArgs

func (env *Env) SetEnvArgs(newArgs []string)

func (*Env) SetFilename

func (env *Env) SetFilename(obj Object)

This runs after invariant initialization, which includes calling

NewEnv().  NOTE: Any changes to the list of run-time
initializations must be reflected in gen_code/gen_code.go.

func (*Env) SetMainFilename

func (env *Env) SetMainFilename(filename string)

This runs after invariant initialization, which includes calling

NewEnv().  NOTE: Any changes to the list of run-time
initializations must be reflected in gen_code/gen_code.go.

func (*Env) SetStdIO

func (env *Env) SetStdIO(stdin, stdout, stderr Object)

func (*Env) StdIO

func (env *Env) StdIO() (stdin, stdout, stderr Object)

type Equality

type Equality interface {
	Equals(interface{}) bool
}

type Error

type Error interface {
	error
	Object
	Message() Object
}

func EnsureArgIsError

func EnsureArgIsError(args []Object, index int) Error

func EnsureObjectIsError

func EnsureObjectIsError(obj Object, pattern string) Error

type EvalError

type EvalError struct {
	// contains filtered or unexported fields
}

func FailArg

func FailArg(obj Object, typeName string, index int) *EvalError

func FailObject

func FailObject(obj Object, typeName, pattern string) *EvalError

func MakeEvalError

func MakeEvalError(msg string, pos Position, rt *Runtime) *EvalError

func (*EvalError) Equals

func (err *EvalError) Equals(other interface{}) bool

func (*EvalError) Error

func (err *EvalError) Error() string

func (*EvalError) GetInfo

func (err *EvalError) GetInfo() *ObjectInfo

func (*EvalError) GetType

func (err *EvalError) GetType() *Type

func (*EvalError) Hash

func (err *EvalError) Hash() uint32

func (*EvalError) Message

func (err *EvalError) Message() Object

func (*EvalError) ToString

func (err *EvalError) ToString(escape bool) string

func (*EvalError) WithInfo

func (err *EvalError) WithInfo(info *ObjectInfo) Object

type ExInfo

type ExInfo struct {
	ArrayMap
	// contains filtered or unexported fields
}

func (*ExInfo) Equals

func (exInfo *ExInfo) Equals(other interface{}) bool

func (*ExInfo) Error

func (exInfo *ExInfo) Error() string

func (*ExInfo) GetType

func (exInfo *ExInfo) GetType() *Type

func (*ExInfo) Hash

func (exInfo *ExInfo) Hash() uint32

func (*ExInfo) Message

func (exInfo *ExInfo) Message() Object

func (*ExInfo) ToString

func (exInfo *ExInfo) ToString(escape bool) string

func (*ExInfo) WithInfo

func (x *ExInfo) WithInfo(info *ObjectInfo) Object

type Expr

type Expr interface {
	Eval(env *LocalEnv) Object
	InferType() *Type
	Pos() Position
	Dump(includePosition bool) Map
	Pack(p []byte, env *PackEnv) []byte
}

func Parse

func Parse(obj Object, ctx *ParseContext) Expr

func TryParse

func TryParse(obj Object, ctx *ParseContext) (expr Expr, err error)

func UnpackExpr

func UnpackExpr(p []byte, header *PackHeader) (Expr, []byte)

func UnpackExprOrNull

func UnpackExprOrNull(p []byte, header *PackHeader) (Expr, []byte)

type File

type File struct {
	*os.File
}

func EnsureArgIsFile

func EnsureArgIsFile(args []Object, index int) *File

func EnsureObjectIsFile

func EnsureObjectIsFile(obj Object, pattern string) *File

func ExtractFile

func ExtractFile(args []Object, index int) *File

func MakeFile

func MakeFile(f *os.File) *File

func (*File) Equals

func (f *File) Equals(other interface{}) bool

func (*File) GetInfo

func (f *File) GetInfo() *ObjectInfo

func (*File) GetType

func (f *File) GetType() *Type

func (*File) Hash

func (f *File) Hash() uint32

func (*File) Namespace

func (f *File) Namespace() string

To satisfy Named interface

func (*File) ToString

func (f *File) ToString(escape bool) string

func (*File) WithInfo

func (f *File) WithInfo(info *ObjectInfo) Object

type Fn

type Fn struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EnsureArgIsFn

func EnsureArgIsFn(args []Object, index int) *Fn

func EnsureObjectIsFn

func EnsureObjectIsFn(obj Object, pattern string) *Fn

func (*Fn) Call

func (fn *Fn) Call(args []Object) Object

func (*Fn) Compare

func (fn *Fn) Compare(a, b Object) int

func (*Fn) Equals

func (fn *Fn) Equals(other interface{}) bool

func (*Fn) GetType

func (fn *Fn) GetType() *Type

func (*Fn) Hash

func (fn *Fn) Hash() uint32

func (*Fn) ToString

func (fn *Fn) ToString(escape bool) string

func (*Fn) WithInfo

func (x *Fn) WithInfo(info *ObjectInfo) Object

func (*Fn) WithMeta

func (fn *Fn) WithMeta(meta Map) Object

type FnArityExpr

type FnArityExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*FnArityExpr) Dump

func (expr *FnArityExpr) Dump(pos bool) Map

func (*FnArityExpr) Eval

func (expr *FnArityExpr) Eval(env *LocalEnv) Object

func (*FnArityExpr) InferType

func (expr *FnArityExpr) InferType() *Type

func (*FnArityExpr) Pack

func (expr *FnArityExpr) Pack(p []byte, env *PackEnv) []byte

type FnExpr

type FnExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*FnExpr) Dump

func (expr *FnExpr) Dump(pos bool) Map

func (*FnExpr) Eval

func (expr *FnExpr) Eval(env *LocalEnv) Object

func (*FnExpr) InferType

func (expr *FnExpr) InferType() *Type

func (*FnExpr) Pack

func (expr *FnExpr) Pack(p []byte, env *PackEnv) []byte

type Formatter

type Formatter interface {
	Format(writer io.Writer, indent int) int
}

type Frame

type Frame struct {
	// contains filtered or unexported fields
}

type FutureResult

type FutureResult struct {
	// contains filtered or unexported fields
}

func MakeFutureResult

func MakeFutureResult(value Object, err Error) FutureResult

type Gettable

type Gettable interface {
	Get(key Object) (bool, Object)
}

type HashCollisionNode

type HashCollisionNode struct {
	// contains filtered or unexported fields
}

type HashMap

type HashMap struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func NewHashMap

func NewHashMap(keyvals ...Object) *HashMap

func (*HashMap) Assoc

func (m *HashMap) Assoc(key, val Object) Associative

func (*HashMap) Call

func (m *HashMap) Call(args []Object) Object

func (*HashMap) Conj

func (m *HashMap) Conj(obj Object) Conjable

func (*HashMap) Count

func (m *HashMap) Count() int

func (*HashMap) Empty

func (m *HashMap) Empty() Collection

func (*HashMap) EntryAt

func (m *HashMap) EntryAt(key Object) *ArrayVector

func (*HashMap) Equals

func (m *HashMap) Equals(other interface{}) bool

func (*HashMap) Get

func (m *HashMap) Get(key Object) (bool, Object)

func (*HashMap) GetType

func (m *HashMap) GetType() *Type

func (*HashMap) Hash

func (m *HashMap) Hash() uint32

func (*HashMap) Iter

func (m *HashMap) Iter() MapIterator

func (*HashMap) Keys

func (m *HashMap) Keys() Seq

func (*HashMap) Merge

func (m *HashMap) Merge(other Map) Map

func (*HashMap) Pprint

func (m *HashMap) Pprint(w io.Writer, indent int) int

func (*HashMap) Seq

func (m *HashMap) Seq() Seq

func (*HashMap) ToString

func (m *HashMap) ToString(escape bool) string

func (*HashMap) Vals

func (m *HashMap) Vals() Seq

func (*HashMap) WithInfo

func (x *HashMap) WithInfo(info *ObjectInfo) Object

func (*HashMap) WithMeta

func (m *HashMap) WithMeta(meta Map) Object

func (*HashMap) Without

func (m *HashMap) Without(key Object) Map

type IOReader

type IOReader struct {
	io.Reader
	// contains filtered or unexported fields
}

func MakeIOReader

func MakeIOReader(r io.Reader) *IOReader

func (*IOReader) Close

func (ior *IOReader) Close() error

func (*IOReader) Equals

func (ior *IOReader) Equals(other interface{}) bool

func (*IOReader) GetInfo

func (ior *IOReader) GetInfo() *ObjectInfo

func (*IOReader) GetType

func (ior *IOReader) GetType() *Type

func (*IOReader) Hash

func (ior *IOReader) Hash() uint32

func (*IOReader) ToString

func (ior *IOReader) ToString(escape bool) string

func (*IOReader) WithInfo

func (ior *IOReader) WithInfo(info *ObjectInfo) Object

type IOWriter

type IOWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

func MakeIOWriter

func MakeIOWriter(w io.Writer) *IOWriter

func (*IOWriter) Close

func (iow *IOWriter) Close() error

func (*IOWriter) Equals

func (iow *IOWriter) Equals(other interface{}) bool

func (*IOWriter) GetInfo

func (iow *IOWriter) GetInfo() *ObjectInfo

func (*IOWriter) GetType

func (iow *IOWriter) GetType() *Type

func (*IOWriter) Hash

func (iow *IOWriter) Hash() uint32

func (*IOWriter) ToString

func (iow *IOWriter) ToString(escape bool) string

func (*IOWriter) WithInfo

func (iow *IOWriter) WithInfo(info *ObjectInfo) Object

type IfExpr

type IfExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*IfExpr) Dump

func (expr *IfExpr) Dump(pos bool) Map

func (*IfExpr) Eval

func (expr *IfExpr) Eval(env *LocalEnv) Object

func (*IfExpr) InferType

func (expr *IfExpr) InferType() *Type

func (*IfExpr) Pack

func (expr *IfExpr) Pack(p []byte, env *PackEnv) []byte

type Indexed

type Indexed interface {
	Nth(i int) Object
	TryNth(i int, d Object) Object
}

type InfoHolder

type InfoHolder struct {
	// contains filtered or unexported fields
}

func (InfoHolder) GetInfo

func (i InfoHolder) GetInfo() *ObjectInfo

type Int

type Int struct {
	InfoHolder
	I        int
	Original string
}

func EnsureArgIsInt

func EnsureArgIsInt(args []Object, index int) Int

func EnsureObjectIsInt

func EnsureObjectIsInt(obj Object, pattern string) Int

func MakeInt

func MakeInt(i int) Int

func MakeIntWithOriginal

func MakeIntWithOriginal(orig string, i int) Int

func (Int) BigFloat

func (i Int) BigFloat() *big.Float

func (Int) BigInt

func (i Int) BigInt() *big.Int

func (Int) Compare

func (i Int) Compare(other Object) int

func (Int) Double

func (i Int) Double() Double

func (Int) Equals

func (i Int) Equals(other interface{}) bool

func (Int) GetType

func (i Int) GetType() *Type

func (Int) Hash

func (i Int) Hash() uint32

func (Int) Int

func (i Int) Int() Int

func (Int) Native

func (i Int) Native() interface{}

func (Int) Precision added in v0.17.1

func (n Int) Precision() *big.Int

func (Int) Ratio

func (i Int) Ratio() *big.Rat

func (Int) ToString

func (i Int) ToString(escape bool) string

func (Int) WithInfo

func (x Int) WithInfo(info *ObjectInfo) Object

type IntOps

type IntOps struct{}

func (IntOps) Add

func (ops IntOps) Add(x, y Number) Number

func (IntOps) Combine

func (ops IntOps) Combine(other Ops) Ops

func (IntOps) Divide

func (ops IntOps) Divide(x, y Number) Number

func (IntOps) Eq

func (ops IntOps) Eq(x Number, y Number) bool

func (IntOps) Gt

func (ops IntOps) Gt(x Number, y Number) bool

func (IntOps) Gte

func (ops IntOps) Gte(x Number, y Number) bool

func (IntOps) IsZero

func (ops IntOps) IsZero(x Number) bool

func (IntOps) Lt

func (ops IntOps) Lt(x Number, y Number) bool

func (IntOps) Lte

func (ops IntOps) Lte(x Number, y Number) bool

func (IntOps) Multiply

func (ops IntOps) Multiply(x, y Number) Number

func (IntOps) Quotient

func (ops IntOps) Quotient(x, y Number) Number

func (IntOps) Rem

func (ops IntOps) Rem(x, y Number) Number

func (IntOps) Subtract

func (ops IntOps) Subtract(x, y Number) Number

type KVReduce

type KVReduce interface {
	// contains filtered or unexported methods
}

func EnsureArgIsKVReduce

func EnsureArgIsKVReduce(args []Object, index int) KVReduce

func EnsureObjectIsKVReduce

func EnsureObjectIsKVReduce(obj Object, pattern string) KVReduce

type Keyword

type Keyword struct {
	InfoHolder
	// contains filtered or unexported fields
}

func EnsureArgIsKeyword

func EnsureArgIsKeyword(args []Object, index int) Keyword

func EnsureObjectIsKeyword

func EnsureObjectIsKeyword(obj Object, pattern string) Keyword

func MakeKeyword

func MakeKeyword(nsname string) Keyword

func (Keyword) Call

func (k Keyword) Call(args []Object) Object

func (Keyword) Compare

func (k Keyword) Compare(other Object) int

func (Keyword) Equals

func (k Keyword) Equals(other interface{}) bool

func (Keyword) GetType

func (k Keyword) GetType() *Type

func (Keyword) Hash

func (k Keyword) Hash() uint32

func (Keyword) Name

func (k Keyword) Name() string

func (Keyword) Namespace

func (k Keyword) Namespace() string

func (Keyword) ToString

func (k Keyword) ToString(escape bool) string

func (Keyword) WithInfo

func (x Keyword) WithInfo(info *ObjectInfo) Object

type Keywords

type Keywords struct {
	// contains filtered or unexported fields
}

type LazySeq

type LazySeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func NewLazySeq

func NewLazySeq(c Callable) *LazySeq

func (*LazySeq) Cons

func (seq *LazySeq) Cons(obj Object) Seq

func (*LazySeq) Equals

func (seq *LazySeq) Equals(other interface{}) bool

func (*LazySeq) First

func (seq *LazySeq) First() Object

func (*LazySeq) Format

func (seq *LazySeq) Format(w io.Writer, indent int) int

func (*LazySeq) GetType

func (seq *LazySeq) GetType() *Type

func (*LazySeq) Hash

func (seq *LazySeq) Hash() uint32

func (*LazySeq) IsEmpty

func (seq *LazySeq) IsEmpty() bool

func (*LazySeq) IsRealized

func (seq *LazySeq) IsRealized() bool

func (*LazySeq) Pprint

func (seq *LazySeq) Pprint(w io.Writer, indent int) int

func (*LazySeq) Rest

func (seq *LazySeq) Rest() Seq

func (*LazySeq) Seq

func (seq *LazySeq) Seq() Seq

func (*LazySeq) ToString

func (seq *LazySeq) ToString(escape bool) string

func (*LazySeq) WithInfo

func (x *LazySeq) WithInfo(info *ObjectInfo) Object

func (*LazySeq) WithMeta

func (seq *LazySeq) WithMeta(meta Map) Object

type LetExpr

type LetExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*LetExpr) Dump

func (expr *LetExpr) Dump(pos bool) Map

func (*LetExpr) Eval

func (expr *LetExpr) Eval(env *LocalEnv) Object

func (*LetExpr) InferType

func (expr *LetExpr) InferType() *Type

func (*LetExpr) Pack

func (expr *LetExpr) Pack(p []byte, env *PackEnv) []byte

type LineRuneReader

type LineRuneReader struct {
	Prompt string
	// contains filtered or unexported fields
}

func NewLineRuneReader

func NewLineRuneReader(rl *liner.State) *LineRuneReader

func (*LineRuneReader) ReadRune

func (lrr *LineRuneReader) ReadRune() (rune, int, error)

type List

type List struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func NewList

func NewList(first Object, rest *List) *List

func NewListFrom

func NewListFrom(objs ...Object) *List

func (*List) Conj

func (list *List) Conj(obj Object) Conjable

func (*List) Cons

func (list *List) Cons(obj Object) Seq

func (*List) Count

func (list *List) Count() int

func (*List) Empty

func (list *List) Empty() Collection

func (*List) Equals

func (list *List) Equals(other interface{}) bool

func (*List) First

func (list *List) First() Object

func (*List) Format

func (seq *List) Format(w io.Writer, indent int) int

func (*List) Forth

func (list *List) Forth() Object

func (*List) GetType

func (list *List) GetType() *Type

func (*List) Hash

func (list *List) Hash() uint32

func (*List) IsEmpty

func (list *List) IsEmpty() bool

func (*List) Peek

func (list *List) Peek() Object

func (*List) Pop

func (list *List) Pop() Stack

func (*List) Pprint

func (seq *List) Pprint(w io.Writer, indent int) int

func (*List) Rest

func (list *List) Rest() Seq

func (*List) Second

func (list *List) Second() Object

func (*List) Seq

func (list *List) Seq() Seq

func (*List) Third

func (list *List) Third() Object

func (*List) ToString

func (list *List) ToString(escape bool) string

func (*List) WithInfo

func (x *List) WithInfo(info *ObjectInfo) Object

func (*List) WithMeta

func (list *List) WithMeta(meta Map) Object

type LiteralExpr

type LiteralExpr struct {
	Position
	// contains filtered or unexported fields
}

func NewLiteralExpr

func NewLiteralExpr(obj Object) *LiteralExpr

func NewSurrogateExpr

func NewSurrogateExpr(obj Object) *LiteralExpr

func (*LiteralExpr) Dump

func (expr *LiteralExpr) Dump(pos bool) Map

func (*LiteralExpr) Eval

func (expr *LiteralExpr) Eval(env *LocalEnv) Object

func (*LiteralExpr) InferType

func (expr *LiteralExpr) InferType() *Type

func (*LiteralExpr) Pack

func (expr *LiteralExpr) Pack(p []byte, env *PackEnv) []byte

type LocalEnv

type LocalEnv struct {
	// contains filtered or unexported fields
}

type LoopExpr

type LoopExpr LetExpr

func (*LoopExpr) Dump

func (expr *LoopExpr) Dump(pos bool) Map

func (*LoopExpr) Eval

func (expr *LoopExpr) Eval(env *LocalEnv) Object

func (*LoopExpr) InferType

func (expr *LoopExpr) InferType() *Type

func (*LoopExpr) Pack

func (expr *LoopExpr) Pack(p []byte, env *PackEnv) []byte

type MacroCallExpr

type MacroCallExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*MacroCallExpr) Dump

func (expr *MacroCallExpr) Dump(pos bool) Map

func (*MacroCallExpr) Eval

func (expr *MacroCallExpr) Eval(env *LocalEnv) Object

func (*MacroCallExpr) InferType

func (expr *MacroCallExpr) InferType() *Type

func (*MacroCallExpr) Name

func (expr *MacroCallExpr) Name() string

type Map

type Map interface {
	Associative
	Seqable
	Counted
	Without(key Object) Map
	Keys() Seq
	Vals() Seq
	Merge(m Map) Map
	Iter() MapIterator
}

func AlterMeta

func AlterMeta(m *MetaHolder, fn *Fn, args []Object) Map

func EnsureArgIsMap

func EnsureArgIsMap(args []Object, index int) Map

func EnsureObjectIsMap

func EnsureObjectIsMap(obj Object, pattern string) Map

func ExtractMap

func ExtractMap(args []Object, index int) Map

func FileInfoMap

func FileInfoMap(name string, info os.FileInfo) Map

func SafeMerge

func SafeMerge(m1, m2 Map) Map

type MapExpr

type MapExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*MapExpr) Dump

func (expr *MapExpr) Dump(pos bool) Map

func (*MapExpr) Eval

func (expr *MapExpr) Eval(env *LocalEnv) Object

func (*MapExpr) InferType

func (expr *MapExpr) InferType() *Type

func (*MapExpr) Pack

func (expr *MapExpr) Pack(p []byte, env *PackEnv) []byte

type MapIterator

type MapIterator interface {
	HasNext() bool
	Next() *Pair
}

type MapSet

type MapSet struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EmptySet

func EmptySet() *MapSet

func NewSetFromSeq

func NewSetFromSeq(s Seq) *MapSet

func (*MapSet) Add

func (set *MapSet) Add(obj Object) bool

func (*MapSet) Call

func (set *MapSet) Call(args []Object) Object

func (*MapSet) Conj

func (set *MapSet) Conj(obj Object) Conjable

func (*MapSet) Count

func (set *MapSet) Count() int

func (*MapSet) Disjoin

func (set *MapSet) Disjoin(key Object) Set

func (*MapSet) Empty

func (set *MapSet) Empty() Collection

func (*MapSet) Equals

func (set *MapSet) Equals(other interface{}) bool

func (*MapSet) Format

func (set *MapSet) Format(w io.Writer, indent int) int

func (*MapSet) Get

func (set *MapSet) Get(key Object) (bool, Object)

func (*MapSet) GetType

func (seq *MapSet) GetType() *Type

func (*MapSet) Hash

func (set *MapSet) Hash() uint32

func (*MapSet) Pprint

func (set *MapSet) Pprint(w io.Writer, indent int) int

func (*MapSet) Seq

func (set *MapSet) Seq() Seq

func (*MapSet) ToString

func (set *MapSet) ToString(escape bool) string

func (*MapSet) WithInfo

func (x *MapSet) WithInfo(info *ObjectInfo) Object

func (*MapSet) WithMeta

func (v *MapSet) WithMeta(meta Map) Object

type MappingSeq

type MappingSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*MappingSeq) Cons

func (seq *MappingSeq) Cons(obj Object) Seq

func (*MappingSeq) Equals

func (seq *MappingSeq) Equals(other interface{}) bool

func (*MappingSeq) First

func (seq *MappingSeq) First() Object

func (*MappingSeq) Format

func (seq *MappingSeq) Format(w io.Writer, indent int) int

func (*MappingSeq) GetType

func (seq *MappingSeq) GetType() *Type

func (*MappingSeq) Hash

func (seq *MappingSeq) Hash() uint32

func (*MappingSeq) IsEmpty

func (seq *MappingSeq) IsEmpty() bool

func (*MappingSeq) Pprint

func (seq *MappingSeq) Pprint(w io.Writer, indent int) int

func (*MappingSeq) Rest

func (seq *MappingSeq) Rest() Seq

func (*MappingSeq) Seq

func (seq *MappingSeq) Seq() Seq

func (*MappingSeq) ToString

func (seq *MappingSeq) ToString(escape bool) string

func (*MappingSeq) WithInfo

func (x *MappingSeq) WithInfo(info *ObjectInfo) Object

func (*MappingSeq) WithMeta

func (seq *MappingSeq) WithMeta(meta Map) Object

type Meta

type Meta interface {
	GetMeta() Map
	WithMeta(Map) Object
}

func EnsureArgIsMeta

func EnsureArgIsMeta(args []Object, index int) Meta

func EnsureObjectIsMeta

func EnsureObjectIsMeta(obj Object, pattern string) Meta

type MetaExpr

type MetaExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*MetaExpr) Dump

func (expr *MetaExpr) Dump(pos bool) Map

func (*MetaExpr) Eval

func (expr *MetaExpr) Eval(env *LocalEnv) Object

func (*MetaExpr) InferType

func (expr *MetaExpr) InferType() *Type

func (*MetaExpr) Pack

func (expr *MetaExpr) Pack(p []byte, env *PackEnv) []byte

type MetaHolder

type MetaHolder struct {
	// contains filtered or unexported fields
}

func (MetaHolder) GetMeta

func (m MetaHolder) GetMeta() Map

type Named

type Named interface {
	Name() string
	Namespace() string
}

func EnsureArgIsNamed

func EnsureArgIsNamed(args []Object, index int) Named

func EnsureObjectIsNamed

func EnsureObjectIsNamed(obj Object, pattern string) Named

type Namespace

type Namespace struct {
	MetaHolder
	Name Symbol
	Lazy func()
	// contains filtered or unexported fields
}

func EnsureArgIsNamespace

func EnsureArgIsNamespace(args []Object, index int) *Namespace

func EnsureObjectIsNamespace

func EnsureObjectIsNamespace(obj Object, pattern string) *Namespace

func NewNamespace

func NewNamespace(sym Symbol) *Namespace

func (*Namespace) AddAlias

func (ns *Namespace) AddAlias(alias Symbol, namespace *Namespace)

func (*Namespace) Aliases

func (ns *Namespace) Aliases() map[*string]*Namespace

func (*Namespace) AlterMeta

func (ns *Namespace) AlterMeta(fn *Fn, args []Object) Map

func (*Namespace) Equals

func (ns *Namespace) Equals(other interface{}) bool

func (*Namespace) GetInfo

func (ns *Namespace) GetInfo() *ObjectInfo

func (*Namespace) GetType

func (ns *Namespace) GetType() *Type

func (*Namespace) Hash

func (ns *Namespace) Hash() uint32

func (*Namespace) Intern

func (ns *Namespace) Intern(sym Symbol) *Var

func (*Namespace) InternFake

func (ns *Namespace) InternFake(sym Symbol) *Var

func (*Namespace) InternVar

func (ns *Namespace) InternVar(name string, val Object, meta *ArrayMap) *Var

func (*Namespace) Mappings

func (ns *Namespace) Mappings() map[*string]*Var

func (*Namespace) MaybeLazy

func (ns *Namespace) MaybeLazy(doc string)

func (*Namespace) Print

func (ns *Namespace) Print(w io.Writer, printReadably bool)

func (*Namespace) Refer

func (ns *Namespace) Refer(sym Symbol, vr *Var) *Var

func (*Namespace) ReferAll

func (ns *Namespace) ReferAll(other *Namespace)

func (*Namespace) ResetMeta

func (ns *Namespace) ResetMeta(newMeta Map) Map

func (*Namespace) Resolve

func (ns *Namespace) Resolve(name string) *Var

func (*Namespace) ToString

func (ns *Namespace) ToString(escape bool) string

func (*Namespace) WithInfo

func (ns *Namespace) WithInfo(info *ObjectInfo) Object

func (*Namespace) WithMeta

func (ns *Namespace) WithMeta(meta Map) Object

type Native

type Native interface {
	Native() interface{}
}

type Nil

type Nil struct {
	InfoHolder
	// contains filtered or unexported fields
}

func (Nil) Assoc

func (n Nil) Assoc(key, value Object) Associative

func (Nil) Conj

func (n Nil) Conj(obj Object) Conjable

func (Nil) Cons

func (n Nil) Cons(obj Object) Seq

func (Nil) Count

func (n Nil) Count() int

func (Nil) Disjoin

func (n Nil) Disjoin(key Object) Set

func (Nil) EntryAt

func (n Nil) EntryAt(key Object) *ArrayVector

func (Nil) Equals

func (n Nil) Equals(other interface{}) bool

func (Nil) First

func (n Nil) First() Object

func (Nil) Get

func (n Nil) Get(key Object) (bool, Object)

func (Nil) GetType

func (n Nil) GetType() *Type

func (Nil) Hash

func (n Nil) Hash() uint32

func (Nil) IsEmpty

func (n Nil) IsEmpty() bool

func (Nil) Iter

func (n Nil) Iter() MapIterator

func (Nil) Keys

func (n Nil) Keys() Seq

func (Nil) Merge

func (n Nil) Merge(other Map) Map

func (Nil) Rest

func (n Nil) Rest() Seq

func (Nil) Seq

func (n Nil) Seq() Seq

func (Nil) ToString

func (n Nil) ToString(escape bool) string

func (Nil) Vals

func (n Nil) Vals() Seq

func (Nil) WithInfo

func (x Nil) WithInfo(info *ObjectInfo) Object

func (Nil) Without

func (n Nil) Without(key Object) Map

type Node

type Node interface {
	// contains filtered or unexported methods
}

type NodeIterator

type NodeIterator struct {
	// contains filtered or unexported fields
}

func (*NodeIterator) HasNext

func (iter *NodeIterator) HasNext() bool

func (*NodeIterator) Next

func (iter *NodeIterator) Next() *Pair

type NodeSeq

type NodeSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*NodeSeq) Cons

func (s *NodeSeq) Cons(obj Object) Seq

func (*NodeSeq) Equals

func (s *NodeSeq) Equals(other interface{}) bool

func (*NodeSeq) First

func (s *NodeSeq) First() Object

func (*NodeSeq) Format

func (seq *NodeSeq) Format(w io.Writer, indent int) int

func (*NodeSeq) GetType

func (s *NodeSeq) GetType() *Type

func (*NodeSeq) Hash

func (s *NodeSeq) Hash() uint32

func (*NodeSeq) IsEmpty

func (s *NodeSeq) IsEmpty() bool

func (*NodeSeq) Pprint

func (seq *NodeSeq) Pprint(w io.Writer, indent int) int

func (*NodeSeq) Rest

func (s *NodeSeq) Rest() Seq

func (*NodeSeq) Seq

func (s *NodeSeq) Seq() Seq

func (*NodeSeq) ToString

func (s *NodeSeq) ToString(escape bool) string

func (*NodeSeq) WithInfo

func (x *NodeSeq) WithInfo(info *ObjectInfo) Object

func (*NodeSeq) WithMeta

func (s *NodeSeq) WithMeta(meta Map) Object

type Number

type Number interface {
	Object
	Int() Int
	Double() Double
	BigInt() *big.Int
	BigFloat() *big.Float
	Ratio() *big.Rat
}

func EnsureArgIsNumber

func EnsureArgIsNumber(args []Object, index int) Number

func EnsureObjectIsNumber

func EnsureObjectIsNumber(obj Object, pattern string) Number

func ExtractNumber

func ExtractNumber(args []Object, index int) Number

func Max

func Max(x Number, y Number) Number

func Min

func Min(x Number, y Number) Number

type Object

type Object interface {
	Equality
	ToString(escape bool) string
	GetInfo() *ObjectInfo
	WithInfo(*ObjectInfo) Object
	GetType() *Type
	Hash() uint32
}

func CountedIndexedGet added in v1.3.0

func CountedIndexedGet(v CountedIndexed, key Object) (bool, Object)

func CountedIndexedKvreduce added in v1.3.0

func CountedIndexedKvreduce(v CountedIndexed, c Callable, init Object) Object

func CountedIndexedReduce added in v1.3.0

func CountedIndexedReduce(v CountedIndexed, c Callable) Object

func CountedIndexedReduceInit added in v1.3.0

func CountedIndexedReduceInit(v CountedIndexed, c Callable, init Object) Object

func DeriveReadObject

func DeriveReadObject(base Object, obj Object) Object

func Eval

func Eval(expr Expr, env *LocalEnv) Object

func ExtractObject

func ExtractObject(args []Object, index int) Object

func Fourth

func Fourth(seq Seq) Object

func MakeReadObject

func MakeReadObject(reader *Reader, obj Object) Object

func Read

func Read(reader *Reader) (Object, bool)

func Second

func Second(seq Seq) Object

func SeqNth

func SeqNth(seq Seq, n int) Object

func SeqTryNth

func SeqTryNth(seq Seq, n int, d Object) Object

func Third

func Third(seq Seq) Object

func ToSlice

func ToSlice(seq Seq) []Object

func TryEval

func TryEval(expr Expr) (obj Object, err error)

func TryRead

func TryRead(reader *Reader) (obj Object, err error)

func UnpackObjectOrNull

func UnpackObjectOrNull(p []byte, header *PackHeader) (Object, []byte)

type ObjectInfo

type ObjectInfo struct {
	Position
	// contains filtered or unexported fields
}

func (*ObjectInfo) Pack

func (info *ObjectInfo) Pack(p []byte, env *PackEnv) []byte

type Ops

type Ops interface {
	Combine(ops Ops) Ops
	Add(Number, Number) Number
	Subtract(Number, Number) Number
	Multiply(Number, Number) Number
	Divide(Number, Number) Number
	IsZero(Number) bool
	Lt(Number, Number) bool
	Lte(Number, Number) bool
	Gt(Number, Number) bool
	Gte(Number, Number) bool
	Eq(Number, Number) bool
	Quotient(Number, Number) Number
	Rem(Number, Number) Number
}

func GetOps

func GetOps(obj Object) Ops

type PackEnv

type PackEnv struct {
	Strings  map[*string]uint16
	Bindings map[*Binding]int
	// contains filtered or unexported fields
}

func NewPackEnv

func NewPackEnv() *PackEnv

func (*PackEnv) Pack

func (env *PackEnv) Pack(p []byte) []byte

type PackHeader

type PackHeader struct {
	GlobalEnv *Env
	Strings   []*string
	Bindings  []Binding
}

func UnpackHeader

func UnpackHeader(p []byte, env *Env) (*PackHeader, []byte)

type Pair

type Pair struct {
	Key   Object
	Value Object
}

type ParseContext

type ParseContext struct {
	GlobalEnv *Env
	// contains filtered or unexported fields
}

func (*ParseContext) GetLocalBinding

func (ctx *ParseContext) GetLocalBinding(sym Symbol) *Binding

func (*ParseContext) GetLoopBindings

func (ctx *ParseContext) GetLoopBindings() []Symbol

func (*ParseContext) PopLocalFrame

func (ctx *ParseContext) PopLocalFrame()

func (*ParseContext) PopLoopBindings

func (ctx *ParseContext) PopLoopBindings()

func (*ParseContext) PushEmptyLocalFrame

func (ctx *ParseContext) PushEmptyLocalFrame()

func (*ParseContext) PushLocalFrame

func (ctx *ParseContext) PushLocalFrame(names []Symbol)

func (*ParseContext) PushLoopBindings

func (ctx *ParseContext) PushLoopBindings(bindings []Symbol)

type ParseError

type ParseError struct {
	// contains filtered or unexported fields
}

func (*ParseError) Equals

func (err *ParseError) Equals(other interface{}) bool

func (ParseError) Error

func (err ParseError) Error() string

func (*ParseError) GetInfo

func (err *ParseError) GetInfo() *ObjectInfo

func (*ParseError) GetType

func (err *ParseError) GetType() *Type

func (*ParseError) Hash

func (err *ParseError) Hash() uint32

func (*ParseError) Message

func (err *ParseError) Message() Object

func (*ParseError) ToString

func (err *ParseError) ToString(escape bool) string

func (*ParseError) WithInfo

func (err *ParseError) WithInfo(info *ObjectInfo) Object

type Pending

type Pending interface {
	IsRealized() bool
}

func EnsureArgIsPending

func EnsureArgIsPending(args []Object, index int) Pending

func EnsureObjectIsPending

func EnsureObjectIsPending(obj Object, pattern string) Pending

type Phase

type Phase int
const (
	READ Phase = iota
	FORMAT
	PARSE
	EVAL
	PRINT_IF_NOT_NIL
)

type Position

type Position struct {
	// contains filtered or unexported fields
}

func GetPosition

func GetPosition(obj Object) Position

func (Position) Filename

func (pos Position) Filename() string

func (Position) Pack

func (pos Position) Pack(p []byte, env *PackEnv) []byte

func (Position) Pos

func (pos Position) Pos() Position

type Pprinter

type Pprinter interface {
	Pprint(writer io.Writer, indent int) int
}

type Precision added in v0.17.1

type Precision interface {
	Precision() *big.Int
}

type Printer

type Printer interface {
	Print(writer io.Writer, printReadably bool)
}

type Proc

type Proc struct {
	Fn      ProcFn
	Name    string
	Package string // "" for core (this package), else e.g. "std/string"
}

func (Proc) Call

func (p Proc) Call(args []Object) Object

func (Proc) Compare

func (p Proc) Compare(a, b Object) int

func (Proc) Equals

func (p Proc) Equals(other interface{}) bool

func (Proc) GetInfo

func (p Proc) GetInfo() *ObjectInfo

func (Proc) GetType

func (p Proc) GetType() *Type

func (Proc) Hash

func (p Proc) Hash() uint32

func (Proc) ToString

func (p Proc) ToString(escape bool) string

func (Proc) WithInfo

func (p Proc) WithInfo(*ObjectInfo) Object

type ProcFn

type ProcFn func([]Object) Object

type Ratio

type Ratio struct {
	InfoHolder

	Original string
	// contains filtered or unexported fields
}

func EnsureArgIsRatio

func EnsureArgIsRatio(args []Object, index int) *Ratio

func EnsureObjectIsRatio

func EnsureObjectIsRatio(obj Object, pattern string) *Ratio

func (*Ratio) BigFloat

func (r *Ratio) BigFloat() *big.Float

func (*Ratio) BigInt

func (r *Ratio) BigInt() *big.Int

func (*Ratio) Compare

func (rat *Ratio) Compare(other Object) int

func (*Ratio) Double

func (r *Ratio) Double() Double

func (*Ratio) Equals

func (rat *Ratio) Equals(other interface{}) bool

func (*Ratio) GetType

func (rat *Ratio) GetType() *Type

func (*Ratio) Hash

func (rat *Ratio) Hash() uint32

func (*Ratio) Int

func (r *Ratio) Int() Int

func (*Ratio) Ratio

func (r *Ratio) Ratio() *big.Rat

func (*Ratio) ToString

func (rat *Ratio) ToString(escape bool) string

func (*Ratio) WithInfo

func (x *Ratio) WithInfo(info *ObjectInfo) Object

type RatioOps

type RatioOps struct{}

func (RatioOps) Add

func (ops RatioOps) Add(x, y Number) Number

func (RatioOps) Combine

func (ops RatioOps) Combine(other Ops) Ops

func (RatioOps) Divide

func (ops RatioOps) Divide(x, y Number) Number

func (RatioOps) Eq

func (ops RatioOps) Eq(x Number, y Number) bool

func (RatioOps) Gt

func (ops RatioOps) Gt(x Number, y Number) bool

func (RatioOps) Gte

func (ops RatioOps) Gte(x Number, y Number) bool

func (RatioOps) IsZero

func (ops RatioOps) IsZero(x Number) bool

func (RatioOps) Lt

func (ops RatioOps) Lt(x Number, y Number) bool

func (RatioOps) Lte

func (ops RatioOps) Lte(x Number, y Number) bool

func (RatioOps) Multiply

func (ops RatioOps) Multiply(x, y Number) Number

func (RatioOps) Quotient

func (ops RatioOps) Quotient(x, y Number) Number

func (RatioOps) Rem

func (ops RatioOps) Rem(x, y Number) Number

func (RatioOps) Subtract

func (ops RatioOps) Subtract(x, y Number) Number

type ReadError

type ReadError struct {
	// contains filtered or unexported fields
}

func MakeReadError

func MakeReadError(reader *Reader, msg string) ReadError

func (ReadError) Error

func (err ReadError) Error() string

func (ReadError) Message

func (err ReadError) Message() Object

type ReadFunc

type ReadFunc func(reader *Reader) Object

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(runeReader io.RuneReader, filename string) *Reader

func NewReaderFromFile

func NewReaderFromFile(filename string) (*Reader, error)

func (*Reader) Get

func (reader *Reader) Get() rune

func (*Reader) Peek

func (reader *Reader) Peek() rune

func (*Reader) Unget

func (reader *Reader) Unget()

type RecurBindings

type RecurBindings []Object

func (RecurBindings) Equals

func (rb RecurBindings) Equals(other interface{}) bool

func (RecurBindings) GetInfo

func (rb RecurBindings) GetInfo() *ObjectInfo

func (RecurBindings) GetType

func (rb RecurBindings) GetType() *Type

func (RecurBindings) Hash

func (rb RecurBindings) Hash() uint32

func (RecurBindings) ToString

func (rb RecurBindings) ToString(escape bool) string

func (RecurBindings) WithInfo

func (x RecurBindings) WithInfo(info *ObjectInfo) Object

type RecurExpr

type RecurExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*RecurExpr) Dump

func (expr *RecurExpr) Dump(pos bool) Map

func (*RecurExpr) Eval

func (expr *RecurExpr) Eval(env *LocalEnv) Object

func (*RecurExpr) InferType

func (expr *RecurExpr) InferType() *Type

func (*RecurExpr) Pack

func (expr *RecurExpr) Pack(p []byte, env *PackEnv) []byte

type Reduce added in v1.3.0

type Reduce interface {
	// contains filtered or unexported methods
}

func EnsureArgIsReduce added in v1.3.0

func EnsureArgIsReduce(args []Object, index int) Reduce

func EnsureObjectIsReduce added in v1.3.0

func EnsureObjectIsReduce(obj Object, pattern string) Reduce

type Ref

type Ref interface {
	AlterMeta(fn *Fn, args []Object) Map
	ResetMeta(m Map) Map
}

func EnsureArgIsRef

func EnsureArgIsRef(args []Object, index int) Ref

func EnsureObjectIsRef

func EnsureObjectIsRef(obj Object, pattern string) Ref

type Regex

type Regex struct {
	InfoHolder
	R *regexp.Regexp
}

func EnsureArgIsRegex

func EnsureArgIsRegex(args []Object, index int) *Regex

func EnsureObjectIsRegex

func EnsureObjectIsRegex(obj Object, pattern string) *Regex

func MakeRegex

func MakeRegex(r *regexp.Regexp) *Regex

func (*Regex) Equals

func (rx *Regex) Equals(other interface{}) bool

func (*Regex) GetType

func (rx *Regex) GetType() *Type

func (*Regex) Hash

func (rx *Regex) Hash() uint32

func (*Regex) Print

func (rx *Regex) Print(w io.Writer, printReadably bool)

func (*Regex) ToString

func (rx *Regex) ToString(escape bool) string

func (*Regex) WithInfo

func (x *Regex) WithInfo(info *ObjectInfo) Object

type RequireSort

type RequireSort []Object

func (RequireSort) Len

func (rs RequireSort) Len() int

func (RequireSort) Less

func (rs RequireSort) Less(i, j int) bool

func (RequireSort) Swap

func (rs RequireSort) Swap(i, j int)

type Reversible

type Reversible interface {
	Rseq() Seq
}

func EnsureArgIsReversible

func EnsureArgIsReversible(args []Object, index int) Reversible

func EnsureObjectIsReversible

func EnsureObjectIsReversible(obj Object, pattern string) Reversible

type RuneWindow

type RuneWindow struct {
	// contains filtered or unexported fields
}

type Runtime

type Runtime struct {
	GIL sync.Mutex
	// contains filtered or unexported fields
}
var RT *Runtime = &Runtime{
	callstack: &Callstack{frames: make([]Frame, 0, 50)},
}

func (*Runtime) NewArgTypeError

func (rt *Runtime) NewArgTypeError(index int, obj Object, expectedType string) *EvalError

func (*Runtime) NewError

func (rt *Runtime) NewError(msg string) *EvalError

func (*Runtime) NewErrorWithPos

func (rt *Runtime) NewErrorWithPos(msg string, pos Position) *EvalError

type Seq

type Seq interface {
	Seqable
	Object
	First() Object
	Rest() Seq
	IsEmpty() bool
	Cons(obj Object) Seq
}

type SeqIterator

type SeqIterator struct {
	// contains filtered or unexported fields
}

func (*SeqIterator) HasNext

func (iter *SeqIterator) HasNext() bool

func (*SeqIterator) Next

func (iter *SeqIterator) Next() Object

type Seqable

type Seqable interface {
	Seq() Seq
}

func EnsureArgIsSeqable

func EnsureArgIsSeqable(args []Object, index int) Seqable

func EnsureObjectIsSeqable

func EnsureObjectIsSeqable(obj Object, pattern string) Seqable

func ExtractSeqable

func ExtractSeqable(args []Object, index int) Seqable

type Sequential

type Sequential interface {
	// contains filtered or unexported methods
}

type Set

type Set interface {
	Conjable
	Gettable
	Disjoin(key Object) Set
}

func EnsureArgIsSet

func EnsureArgIsSet(args []Object, index int) Set

func EnsureObjectIsSet

func EnsureObjectIsSet(obj Object, pattern string) Set

type SetExpr

type SetExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*SetExpr) Dump

func (expr *SetExpr) Dump(pos bool) Map

func (*SetExpr) Eval

func (expr *SetExpr) Eval(env *LocalEnv) Object

func (*SetExpr) InferType

func (expr *SetExpr) InferType() *Type

func (*SetExpr) Pack

func (expr *SetExpr) Pack(p []byte, env *PackEnv) []byte

type SetMacroExpr

type SetMacroExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*SetMacroExpr) Dump

func (expr *SetMacroExpr) Dump(pos bool) Map

func (*SetMacroExpr) Eval

func (expr *SetMacroExpr) Eval(env *LocalEnv) Object

func (*SetMacroExpr) InferType

func (expr *SetMacroExpr) InferType() *Type

func (*SetMacroExpr) Pack

func (expr *SetMacroExpr) Pack(p []byte, env *PackEnv) []byte

type SortableSlice

type SortableSlice struct {
	// contains filtered or unexported fields
}

func (SortableSlice) Len

func (s SortableSlice) Len() int

func (SortableSlice) Less

func (s SortableSlice) Less(i, j int) bool

func (SortableSlice) Swap

func (s SortableSlice) Swap(i, j int)

type Stack

type Stack interface {
	Peek() Object
	Pop() Stack
}

func EnsureArgIsStack

func EnsureArgIsStack(args []Object, index int) Stack

func EnsureObjectIsStack

func EnsureObjectIsStack(obj Object, pattern string) Stack

type Str

type Str struct {
	// contains filtered or unexported fields
}

type String

type String struct {
	InfoHolder
	S string
}

func EnsureArgIsString

func EnsureArgIsString(args []Object, index int) String

func EnsureArgIsStringable

func EnsureArgIsStringable(args []Object, index int) String

func EnsureObjectIsString

func EnsureObjectIsString(obj Object, pattern string) String

func EnsureObjectIsStringable

func EnsureObjectIsStringable(obj Object, pattern string) String

func MakeString

func MakeString(s string) String

func (String) Compare

func (s String) Compare(other Object) int

func (String) Count

func (s String) Count() int

func (String) Equals

func (s String) Equals(other interface{}) bool

func (String) Format

func (s String) Format(w io.Writer, indent int) int

func (String) GetType

func (s String) GetType() *Type

func (String) Hash

func (s String) Hash() uint32

func (String) Native

func (s String) Native() interface{}

func (String) Nth

func (s String) Nth(i int) Object

func (String) Seq

func (s String) Seq() Seq

func (String) ToString

func (s String) ToString(escape bool) string

func (String) TryNth

func (s String) TryNth(i int, d Object) Object

func (String) WithInfo

func (x String) WithInfo(info *ObjectInfo) Object

type StringPool

type StringPool map[string]*string

func (StringPool) Intern

func (p StringPool) Intern(s string) *string

type StringReader

type StringReader interface {
	ReadString(delim byte) (s string, e error)
}

func EnsureArgIsStringReader

func EnsureArgIsStringReader(args []Object, index int) StringReader

func EnsureObjectIsStringReader

func EnsureObjectIsStringReader(obj Object, pattern string) StringReader

type Symbol

type Symbol struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EnsureArgIsSymbol

func EnsureArgIsSymbol(args []Object, index int) Symbol

func EnsureObjectIsSymbol

func EnsureObjectIsSymbol(obj Object, pattern string) Symbol

func MakeSymbol

func MakeSymbol(nsname string) Symbol

func (Symbol) Call

func (s Symbol) Call(args []Object) Object

func (Symbol) Compare

func (s Symbol) Compare(other Object) int

func (Symbol) Equals

func (s Symbol) Equals(other interface{}) bool

func (Symbol) GetType

func (s Symbol) GetType() *Type

func (Symbol) Hash

func (s Symbol) Hash() uint32

func (Symbol) Name

func (s Symbol) Name() string

func (Symbol) Namespace

func (s Symbol) Namespace() string

func (Symbol) Pack

func (s Symbol) Pack(p []byte, env *PackEnv) []byte

func (Symbol) ToString

func (s Symbol) ToString(escape bool) string

func (Symbol) WithInfo

func (x Symbol) WithInfo(info *ObjectInfo) Object

func (Symbol) WithMeta

func (sym Symbol) WithMeta(meta Map) Object

type Symbols

type Symbols struct {
	// contains filtered or unexported fields
}

type ThrowExpr

type ThrowExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*ThrowExpr) Dump

func (expr *ThrowExpr) Dump(pos bool) Map

func (*ThrowExpr) Eval

func (expr *ThrowExpr) Eval(env *LocalEnv) Object

func (*ThrowExpr) InferType

func (expr *ThrowExpr) InferType() *Type

func (*ThrowExpr) Pack

func (expr *ThrowExpr) Pack(p []byte, env *PackEnv) []byte

type Time

type Time struct {
	InfoHolder
	T time.Time
}

func EnsureArgIsTime

func EnsureArgIsTime(args []Object, index int) Time

func EnsureObjectIsTime

func EnsureObjectIsTime(obj Object, pattern string) Time

func MakeTime

func MakeTime(t time.Time) Time

func (Time) Compare

func (t Time) Compare(other Object) int

func (Time) Equals

func (t Time) Equals(other interface{}) bool

func (Time) GetType

func (t Time) GetType() *Type

func (Time) Hash

func (t Time) Hash() uint32

func (Time) Native

func (t Time) Native() interface{}

func (Time) ToString

func (t Time) ToString(escape bool) string

func (Time) WithInfo

func (x Time) WithInfo(info *ObjectInfo) Object

type Traceable

type Traceable interface {
	Name() string
	Pos() Position
}

type TryExpr

type TryExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*TryExpr) Dump

func (expr *TryExpr) Dump(pos bool) Map

func (*TryExpr) Eval

func (expr *TryExpr) Eval(env *LocalEnv) (obj Object)

func (*TryExpr) InferType

func (expr *TryExpr) InferType() *Type

func (*TryExpr) Pack

func (expr *TryExpr) Pack(p []byte, env *PackEnv) []byte

type Type

type Type struct {
	MetaHolder
	// contains filtered or unexported fields
}

func EnsureArgIsType

func EnsureArgIsType(args []Object, index int) *Type

func EnsureObjectIsType

func EnsureObjectIsType(obj Object, pattern string) *Type

func RegInterface

func RegInterface(name string, inst interface{}, doc string) *Type

func RegRefType

func RegRefType(name string, inst interface{}, doc string) *Type

func RegType

func RegType(name string, inst interface{}, doc string) *Type

func (*Type) Equals

func (t *Type) Equals(other interface{}) bool

func (*Type) GetInfo

func (t *Type) GetInfo() *ObjectInfo

func (*Type) GetType

func (t *Type) GetType() *Type

func (*Type) Hash

func (t *Type) Hash() uint32

func (*Type) Pack

func (t *Type) Pack(p []byte, env *PackEnv) []byte

func (*Type) ToString

func (t *Type) ToString(escape bool) string

func (*Type) WithInfo

func (x *Type) WithInfo(info *ObjectInfo) Object

type Types

type Types struct {
	Associative    *Type
	Callable       *Type
	Collection     *Type
	Comparable     *Type
	Comparator     *Type
	Counted        *Type
	CountedIndexed *Type
	Deref          *Type
	Channel        *Type
	Error          *Type
	Gettable       *Type
	Indexed        *Type
	IOReader       *Type
	IOWriter       *Type
	KVReduce       *Type
	Reduce         *Type
	Map            *Type
	Meta           *Type
	Named          *Type
	Number         *Type
	Pending        *Type
	Ref            *Type
	Reversible     *Type
	Seq            *Type
	Seqable        *Type
	Sequential     *Type
	Set            *Type
	Stack          *Type
	ArrayMap       *Type
	ArrayMapSeq    *Type
	ArrayNodeSeq   *Type
	ArraySeq       *Type
	MapSet         *Type
	Atom           *Type
	BigFloat       *Type
	BigInt         *Type
	Boolean        *Type
	Time           *Type
	Buffer         *Type
	Char           *Type
	ConsSeq        *Type
	Delay          *Type
	Double         *Type
	EvalError      *Type
	ExInfo         *Type
	Fn             *Type
	File           *Type
	BufferedReader *Type
	HashMap        *Type
	Int            *Type
	Keyword        *Type
	LazySeq        *Type
	List           *Type
	MappingSeq     *Type
	Namespace      *Type
	Nil            *Type
	NodeSeq        *Type
	ParseError     *Type
	Proc           *Type
	ProcFn         *Type
	Ratio          *Type
	RecurBindings  *Type
	Regex          *Type
	String         *Type
	Symbol         *Type
	Type           *Type
	Var            *Type
	Vector         *Type
	Vec            *Type
	ArrayVector    *Type
	VectorRSeq     *Type
	VectorSeq      *Type
}

type Var

type Var struct {
	InfoHolder
	MetaHolder

	Value Object
	// contains filtered or unexported fields
}

func EnsureArgIsVar

func EnsureArgIsVar(args []Object, index int) *Var

func EnsureObjectIsVar

func EnsureObjectIsVar(obj Object, pattern string) *Var

func InternFakeSymbol

func InternFakeSymbol(ns *Namespace, sym Symbol) *Var

func (*Var) AlterMeta

func (v *Var) AlterMeta(fn *Fn, args []Object) Map

func (*Var) Call

func (v *Var) Call(args []Object) Object

func (*Var) Deref

func (v *Var) Deref() Object

func (*Var) Equals

func (v *Var) Equals(other interface{}) bool

func (*Var) GetType

func (v *Var) GetType() *Type

func (*Var) Hash

func (v *Var) Hash() uint32

func (*Var) Name

func (v *Var) Name() string

func (*Var) Pack

func (vr *Var) Pack(p []byte, env *PackEnv) []byte

func (*Var) ResetMeta

func (v *Var) ResetMeta(newMeta Map) Map

func (*Var) Resolve

func (v *Var) Resolve() Object

func (*Var) ToString

func (v *Var) ToString(escape bool) string

func (*Var) WithInfo

func (x *Var) WithInfo(info *ObjectInfo) Object

func (*Var) WithMeta

func (v *Var) WithMeta(meta Map) Object

type VarRefExpr

type VarRefExpr struct {
	Position
	// contains filtered or unexported fields
}

func MakeVarRefExpr

func MakeVarRefExpr(vr *Var, obj Object) *VarRefExpr

func (*VarRefExpr) Dump

func (expr *VarRefExpr) Dump(pos bool) Map

func (*VarRefExpr) Eval

func (expr *VarRefExpr) Eval(env *LocalEnv) Object

func (*VarRefExpr) InferType

func (expr *VarRefExpr) InferType() *Type

func (*VarRefExpr) Pack

func (expr *VarRefExpr) Pack(p []byte, env *PackEnv) []byte

type Vec added in v1.3.0

func EnsureArgIsVec added in v1.3.0

func EnsureArgIsVec(args []Object, index int) Vec

func EnsureObjectIsVec added in v1.3.0

func EnsureObjectIsVec(obj Object, pattern string) Vec

type Vector

type Vector struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func EmptyVector

func EmptyVector() *Vector

func NewVectorFrom

func NewVectorFrom(objs ...Object) *Vector

func NewVectorFromSeq

func NewVectorFromSeq(seq Seq) *Vector

func (*Vector) Assoc

func (v *Vector) Assoc(key, val Object) Associative

func (*Vector) At added in v1.3.0

func (v *Vector) At(i int) Object

func (*Vector) Call

func (v *Vector) Call(args []Object) Object

func (*Vector) Compare

func (v *Vector) Compare(other Object) int

func (*Vector) Conj

func (v *Vector) Conj(obj Object) Conjable

func (*Vector) Conjoin

func (v *Vector) Conjoin(obj Object) *Vector

func (*Vector) Count

func (v *Vector) Count() int

func (*Vector) Empty

func (v *Vector) Empty() Collection

func (*Vector) EntryAt

func (v *Vector) EntryAt(key Object) *ArrayVector

func (*Vector) Equals

func (v *Vector) Equals(other interface{}) bool

func (*Vector) Format

func (v *Vector) Format(w io.Writer, indent int) int

func (*Vector) Get

func (v *Vector) Get(key Object) (bool, Object)

func (*Vector) GetType

func (v *Vector) GetType() *Type

func (*Vector) Hash

func (v *Vector) Hash() uint32

func (*Vector) Nth

func (v *Vector) Nth(i int) Object

func (*Vector) Peek

func (v *Vector) Peek() Object

func (*Vector) Pop

func (v *Vector) Pop() Stack

func (*Vector) Pprint

func (v *Vector) Pprint(w io.Writer, indent int) int

func (*Vector) Rseq

func (v *Vector) Rseq() Seq

func (*Vector) Seq

func (v *Vector) Seq() Seq

func (*Vector) ToString

func (v *Vector) ToString(escape bool) string

func (*Vector) TryNth

func (v *Vector) TryNth(i int, d Object) Object

func (*Vector) WithInfo

func (x *Vector) WithInfo(info *ObjectInfo) Object

func (*Vector) WithMeta

func (v *Vector) WithMeta(meta Map) Object

type VectorExpr

type VectorExpr struct {
	Position
	// contains filtered or unexported fields
}

func (*VectorExpr) Dump

func (expr *VectorExpr) Dump(pos bool) Map

func (*VectorExpr) Eval

func (expr *VectorExpr) Eval(env *LocalEnv) Object

func (*VectorExpr) InferType

func (expr *VectorExpr) InferType() *Type

func (*VectorExpr) Pack

func (expr *VectorExpr) Pack(p []byte, env *PackEnv) []byte

type VectorRSeq

type VectorRSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*VectorRSeq) Cons

func (seq *VectorRSeq) Cons(obj Object) Seq

func (*VectorRSeq) Equals

func (seq *VectorRSeq) Equals(other interface{}) bool

func (*VectorRSeq) First

func (seq *VectorRSeq) First() Object

func (*VectorRSeq) Format

func (seq *VectorRSeq) Format(w io.Writer, indent int) int

func (*VectorRSeq) GetType

func (seq *VectorRSeq) GetType() *Type

func (*VectorRSeq) Hash

func (seq *VectorRSeq) Hash() uint32

func (*VectorRSeq) IsEmpty

func (seq *VectorRSeq) IsEmpty() bool

func (*VectorRSeq) Pprint

func (seq *VectorRSeq) Pprint(w io.Writer, indent int) int

func (*VectorRSeq) Rest

func (seq *VectorRSeq) Rest() Seq

func (*VectorRSeq) Seq

func (seq *VectorRSeq) Seq() Seq

func (*VectorRSeq) ToString

func (seq *VectorRSeq) ToString(escape bool) string

func (*VectorRSeq) WithInfo

func (x *VectorRSeq) WithInfo(info *ObjectInfo) Object

func (*VectorRSeq) WithMeta

func (seq *VectorRSeq) WithMeta(meta Map) Object

type VectorSeq

type VectorSeq struct {
	InfoHolder
	MetaHolder
	// contains filtered or unexported fields
}

func (*VectorSeq) Cons

func (seq *VectorSeq) Cons(obj Object) Seq

func (*VectorSeq) Equals

func (seq *VectorSeq) Equals(other interface{}) bool

func (*VectorSeq) First

func (seq *VectorSeq) First() Object

func (*VectorSeq) Format

func (seq *VectorSeq) Format(w io.Writer, indent int) int

func (*VectorSeq) GetType

func (seq *VectorSeq) GetType() *Type

func (*VectorSeq) Hash

func (seq *VectorSeq) Hash() uint32

func (*VectorSeq) IsEmpty

func (seq *VectorSeq) IsEmpty() bool

func (*VectorSeq) Pprint

func (seq *VectorSeq) Pprint(w io.Writer, indent int) int

func (*VectorSeq) Rest

func (seq *VectorSeq) Rest() Seq

func (*VectorSeq) Seq

func (seq *VectorSeq) Seq() Seq

func (*VectorSeq) ToString

func (seq *VectorSeq) ToString(escape bool) string

func (*VectorSeq) WithInfo

func (x *VectorSeq) WithInfo(info *ObjectInfo) Object

func (*VectorSeq) WithMeta

func (seq *VectorSeq) WithMeta(meta Map) Object

type Warnings

type Warnings struct {
	IgnoredFileRegexes []*regexp.Regexp
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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