Documentation
¶
Index ¶
- Constants
- Variables
- func Abs(x any) any
- func Add(x, y any) any
- func AddP(x, y any) any
- func AllKeywords() []string
- func AppendWriter(w io.Writer, v interface{}) io.Writer
- func Apply(fn interface{}, args []interface{}) interface{}
- func Apply0(fn interface{}) any
- func Apply1(fn interface{}, a0 any) any
- func Apply2(fn interface{}, a0, a1 any) any
- func Apply3(fn interface{}, a0, a1, a2 any) any
- func Apply4(fn interface{}, a0, a1, a2, a3 any) any
- func Apply5(fn interface{}, a0, a1, a2, a3, a4 any) any
- func Apply6(fn interface{}, a0, a1, a2, a3, a4, a5 any) any
- func Apply7(fn interface{}, a0, a1, a2, a3, a4, a5, a6 any) any
- func Apply8(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7 any) any
- func Apply9(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8 any) any
- func Apply10(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 any) any
- func Apply11(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 any) any
- func Apply12(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 any) any
- func Apply13(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 any) any
- func Apply14(fn interface{}, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 any) any
- func Apply15(fn interface{}, ...) any
- func Apply16(fn interface{}, ...) any
- func Apply17(fn interface{}, ...) any
- func Apply18(fn interface{}, ...) any
- func Apply19(fn interface{}, ...) any
- func Apply20(fn interface{}, ...) any
- func ApplySeq(fn interface{}, args ISeq) interface{}
- func AsByte(x any) int8
- func AsFloat64(x any) float64
- func AsInt(v any) (int, bool)
- func AsInt64(x any) int64
- func AsNumber(v any) (any, bool)
- func BigIntStringFromFloat64(x float64) string
- func BooleanCast(x any) bool
- func BoundedLength(s ISeq, limit int) int
- func BoxInt64(value int64) any
- func ByteCast(x any) int8
- func CachedCompileRegexp(pattern string) *regexp.Regexp
- func CanApply(fn interface{}) bool
- func CanSeq(x interface{}) bool
- func CatchMatches(r, expect any) bool
- func CharLiteralFromRune(rn rune) string
- func CheckedAddInt64(a, b int64) int64
- func CheckedMultiplyInt64(a, b int64) int64
- func CheckedNegateInt64(value int64) int64
- func CheckedSubInt64(a, b int64) int64
- func CloneThreadBindingFrame() any
- func Compare(x, y any) int
- func ConcatStrings(strs ...string) string
- func Count(coll any) int
- func CreatePersistentHashMap(keyvals any) any
- func CreatePersistentTreeMap(keyvals interface{}) interface{}
- func CreatePersistentTreeMapWithComparator(comparator IFn, keyvals interface{}) interface{}
- func CreatePersistentTreeSet(keys ISeq) any
- func CreatePersistentTreeSetWithComparator(comparator IFn, keys ISeq) any
- func Dissoc(x any, k any) any
- func Divide(x, y any) any
- func Equals(a, b any) bool
- func Equiv(a, b any) bool
- func FieldOrMethod(v interface{}, name string) (interface{}, bool)
- func First(x interface{}) interface{}
- func FloatCast(x any) float32
- func ForceDelay(x any) any
- func GT(x, y any) bool
- func Get(coll, key any) any
- func GetDefault(coll, key, def any) any
- func GetPersistentStructMapAccessor() any
- func GoAppend(slc interface{}, vals ...interface{}) interface{}
- func GoCap(v interface{}) int
- func GoChanOf(typ reflect.Type) reflect.Type
- func GoClose(c interface{})
- func GoComplex(real, imag interface{}) interface{}
- func GoCopy(dst, src interface{}) int
- func GoDelete(m, key interface{})
- func GoDeref(ptr interface{}) interface{}
- func GoImag(c interface{}) interface{}
- func GoIndex(slc, i interface{}) interface{}
- func GoLen(v interface{}) int
- func GoMake(typ reflect.Type, args ...interface{}) interface{}
- func GoMapIndex(m, k interface{}) interface{}
- func GoNew(typ reflect.Type) interface{}
- func GoPanic(v interface{})
- func GoReal(c interface{}) interface{}
- func GoRecv(ch interface{}) (interface{}, bool)
- func GoRecvChanOf(typ reflect.Type) reflect.Type
- func GoSend(ch, val interface{})
- func GoSendChanOf(typ reflect.Type) reflect.Type
- func GoSetMapIndex(m, k, v interface{})
- func GoSlice(slc interface{}, indices ...interface{}) interface{}
- func HasType(target any, v interface{}) bool
- func Hash(x interface{}) uint32
- func HashEq(x any) uint32
- func Identical(a, b any) bool
- func IdentityHash(x interface{}) uint32
- func Import(args ...interface{})
- func Inc(v any) any
- func IncP(v any) any
- func IntCast(x any) int
- func IsAutoRegisteredMethod(mfName string, dispatchVal any, method any) bool
- func IsEmpty(coll any) bool
- func IsFn(value any) bool
- func IsInf(x any) bool
- func IsInstance[T any](v interface{}) bool
- func IsInteger(v any) bool
- func IsNaN(x any) bool
- func IsNil(v interface{}) bool
- func IsNumber(x any) bool
- func IsReduced(v interface{}) bool
- func IsReversible(x interface{}) bool
- func IsSeq(x interface{}) bool
- func IsSeqTruthy(x any) bool
- func IsSorted(x interface{}) bool
- func IsTruthy(v interface{}) bool
- func IsZero(x any) bool
- func LT(x, y any) bool
- func LenientCompare(x, y any) (result int)
- func LongCast(x any) int64
- func Max(x, y any) any
- func Min(x, y any) any
- func Multiply(x, y any) any
- func MustAsInt(v any) int
- func MustAsNumber(v any) any
- func MustHostCast[T any](value any) T
- func MustNth(x interface{}, i int) interface{}
- func NewArithmeticError(msg string) error
- func NewCompilerError(file string, line, col int, err error) error
- func NewError(msg string) error
- func NewHostInstance(class any, args ...any) any
- func NewIllegalArgumentError(msg string) error
- func NewIllegalStateError(msg string) error
- func NewIndexOutOfBoundsError() error
- func NewTaggedLiteral(tag, form any) any
- func NewTimeoutError(msg string) error
- func NewUnsupportedOperationError(msg string) error
- func Nth(x interface{}, n int) (interface{}, bool)
- func NumbersEqual(x, y any) bool
- func Ops(x any) ops
- func Peek(stk IPersistentStack) interface{}
- func PopThreadBindings()
- func Print(x interface{}, w io.Writer)
- func PrintString(v interface{}) string
- func PushThreadBindings(bindings IPersistentMap)
- func RecordApplyTo(record RecordValue, args ISeq) any
- func RecordContainsKey(record RecordValue, key any) bool
- func RecordCount(record RecordValue) int
- func RecordEquiv(record RecordValue, other any) bool
- func RecordHash(cache *uint32, record RecordValue) uint32
- func RecordHashEq(cache *uint32, record RecordValue) uint32
- func RecordInvoke(record RecordValue, args ...any) any
- func RecordString(record RecordValue) string
- func RecordValAt(record RecordValue, key any) any
- func RecordValAtDefault(record RecordValue, key, fallback any) any
- func Reduce(f func(interface{}, interface{}) interface{}, seq ISeq) interface{}
- func ReduceInit(f func(interface{}, interface{}) interface{}, init interface{}, seq ISeq) interface{}
- func ReduceKV(f func(init, k, v interface{}) interface{}, init, coll interface{}) interface{}
- func ReflectType(value any) (reflect.Type, bool)
- func RegisterHostConstructor(javaName string, constructor IFn)
- func RegisterHostTypeConstructor(t reflect.Type, constructor IFn)
- func RegisterReadablePrinter(t reflect.Type, printer func(any, io.Writer))
- func RegisterStringMethod(name string, fn StringMethod)
- func RemoveNamespace(sym *Symbol)
- func ResetThreadBindingFrame(frame any)
- func Rest(x interface{}) interface{}
- func ReverseString(s string) string
- func RuneFromCharLiteral(lit string) (rune, error)
- func SeqToTypedArray(args ...any) any
- func SetField(target interface{}, name string, val interface{}) error
- func SetUnboundVarResolver(resolver func(*Var))
- func ShortCast(x any) int16
- func ShutdownAgents()
- func SliceSet(slc any, idx int, val any)
- func SortSlice(slice []any, comp any)
- func Sub(x, y any) any
- func SubP(x, y any) any
- func ToSlice(x any) []any
- func ToString(v interface{}) string
- func TypeOf(v interface{}) any
- func UncheckedByteCast(x any) int8
- func UncheckedFloatCast(x any) float32
- func UncheckedIntCast(x any) int
- func UncheckedLongCast(x any) int64
- func UncheckedShortCast(x any) int16
- func WithMeta(v any, meta IPersistentMap) (any, error)
- func WriteWriter(w io.Writer, v interface{}) io.Writer
- type AFn
- type AMapEntry
- type APersistentMap
- type APersistentSet
- type APersistentVector
- type ARef
- type AReference
- type ASeq
- type Agent
- type ArithmeticError
- type ArityFn
- func (f ArityFn) ApplyTo(args ISeq) any
- func (f ArityFn) Invoke(args ...any) any
- func (f ArityFn) Invoke0() any
- func (f ArityFn) Invoke1(a0 any) any
- func (f ArityFn) Invoke2(a0, a1 any) any
- func (f ArityFn) Invoke3(a0, a1, a2 any) any
- func (f ArityFn) Invoke4(a0, a1, a2, a3 any) any
- func (f ArityFn) Invoke5(a0, a1, a2, a3, a4 any) any
- func (f ArityFn) Invoke6(a0, a1, a2, a3, a4, a5 any) any
- func (f ArityFn) Invoke7(a0, a1, a2, a3, a4, a5, a6 any) any
- func (f ArityFn) Invoke8(a0, a1, a2, a3, a4, a5, a6, a7 any) any
- func (f ArityFn) Invoke9(a0, a1, a2, a3, a4, a5, a6, a7, a8 any) any
- func (f ArityFn) Invoke10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 any) any
- func (f ArityFn) Invoke11(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 any) any
- func (f ArityFn) Invoke12(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 any) any
- func (f ArityFn) Invoke13(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 any) any
- func (f ArityFn) Invoke14(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 any) any
- func (f ArityFn) Invoke15(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 any) any
- func (f ArityFn) Invoke16(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 any) any
- func (f ArityFn) Invoke17(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 any) any
- func (f ArityFn) Invoke18(...) any
- func (f ArityFn) Invoke19(...) any
- func (f ArityFn) Invoke20(...) any
- func (ArityFn) IsFnValue()
- func (f ArityFn) Meta() IPersistentMap
- func (f ArityFn) WithMeta(meta IPersistentMap) any
- type ArrayList
- type ArrayNode
- type ArrayNodeIterator
- type ArrayNodeSeq
- func (s *ArrayNodeSeq) Cons(obj any) Conser
- func (s *ArrayNodeSeq) Count() int
- func (s *ArrayNodeSeq) Empty() IPersistentCollection
- func (s *ArrayNodeSeq) Equals(obj any) bool
- func (s *ArrayNodeSeq) Equiv(obj any) bool
- func (s *ArrayNodeSeq) First() any
- func (s *ArrayNodeSeq) Hash() uint32
- func (s *ArrayNodeSeq) HashEq() uint32
- func (s *ArrayNodeSeq) Meta() IPersistentMap
- func (s *ArrayNodeSeq) More() ISeq
- func (s *ArrayNodeSeq) Next() ISeq
- func (s *ArrayNodeSeq) Seq() ISeq
- func (s *ArrayNodeSeq) String() string
- func (s *ArrayNodeSeq) WithMeta(meta IPersistentMap) any
- type Associative
- type Atom
- func (a *Atom) AddWatch(key interface{}, fn IFn) IRef
- func (a *Atom) AlterMeta(f IFn, args ISeq) IPersistentMap
- func (a *Atom) CompareAndSet(oldv, newv interface{}) bool
- func (a *Atom) Deref() interface{}
- func (a *Atom) GetValidator() IFn
- func (a *Atom) Meta() IPersistentMap
- func (a *Atom) RemoveWatch(key interface{})
- func (a *Atom) Reset(newVal interface{}) interface{}
- func (a *Atom) ResetMeta(meta IPersistentMap) IPersistentMap
- func (a *Atom) SetValidator(vf IFn)
- func (a *Atom) Swap(f IFn, args ISeq) interface{}
- func (a *Atom) Swap0(f IFn) interface{}
- func (a *Atom) Swap1(f IFn, x interface{}) interface{}
- func (a *Atom) Swap2(f IFn, x, y interface{}) interface{}
- func (a *Atom) Validator() IFn
- func (a *Atom) Watches() IPersistentMap
- type BigDecimal
- func AsBigDecimal(x any) *BigDecimal
- func NewBigDecimal(s string) (*BigDecimal, error)
- func NewBigDecimalFromBigFloat(x *big.Float) *BigDecimal
- func NewBigDecimalFromBigInt(x *big.Int) *BigDecimal
- func NewBigDecimalFromFloat64(x float64) *BigDecimal
- func NewBigDecimalFromInt64(x int64) *BigDecimal
- func NewBigDecimalFromRatio(x *Ratio) *BigDecimal
- func (n *BigDecimal) Abs() *BigDecimal
- func (n *BigDecimal) Add(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) AddInt(x int) *BigDecimal
- func (n *BigDecimal) AddP(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) Cmp(other *BigDecimal) int
- func (n *BigDecimal) Divide(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) Equals(v interface{}) bool
- func (n *BigDecimal) GT(other *BigDecimal) bool
- func (n *BigDecimal) GTE(other *BigDecimal) bool
- func (n *BigDecimal) Hash() uint32
- func (n *BigDecimal) LT(other *BigDecimal) bool
- func (n *BigDecimal) LTE(other *BigDecimal) bool
- func (n *BigDecimal) Multiply(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) Negate() *BigDecimal
- func (n *BigDecimal) Quotient(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) Remainder(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) SetScale(scale any, mode any) *BigDecimal
- func (n *BigDecimal) String() string
- func (n *BigDecimal) StripTrailingZeros() string
- func (n *BigDecimal) Sub(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) SubP(other *BigDecimal) *BigDecimal
- func (n *BigDecimal) ToBigFloat() *big.Float
- func (n *BigDecimal) ToBigInteger() *big.Int
- func (n *BigDecimal) ToPlainString() string
- type BigInt
- func (n *BigInt) Abs() *BigInt
- func (n *BigInt) Add(other *BigInt) *BigInt
- func (n *BigInt) AddInt(x int) *BigInt
- func (n *BigInt) Cmp(other *BigInt) int
- func (n *BigInt) Divide(other *BigInt) any
- func (n *BigInt) Equals(v interface{}) bool
- func (n *BigInt) GT(other *BigInt) bool
- func (n *BigInt) GTE(other *BigInt) bool
- func (n *BigInt) Hash() uint32
- func (n *BigInt) Int64() int64
- func (n *BigInt) IsInt64() bool
- func (n *BigInt) LT(other *BigInt) bool
- func (n *BigInt) LTE(other *BigInt) bool
- func (n *BigInt) Multiply(other *BigInt) *BigInt
- func (n *BigInt) Quotient(other *BigInt) *BigInt
- func (n *BigInt) Remainder(other *BigInt) *BigInt
- func (n *BigInt) ResolveFieldOrMethod(name string) (any, bool)
- func (n *BigInt) String() string
- func (n *BigInt) Sub(other *BigInt) *BigInt
- func (n *BigInt) ToBigDecimal() *BigDecimal
- func (n *BigInt) ToBigInteger() *big.Int
- func (n *BigInt) ToString(args ...any) string
- type BitmapIndexedNode
- type Box
- type Category
- type Char
- type ChunkBuffer
- type ChunkedCons
- func (c *ChunkedCons) ChunkedFirst() IChunk
- func (c *ChunkedCons) ChunkedMore() ISeq
- func (c *ChunkedCons) ChunkedNext() ISeq
- func (c *ChunkedCons) Cons(o any) Conser
- func (c *ChunkedCons) Count() int
- func (c *ChunkedCons) Empty() IPersistentCollection
- func (c *ChunkedCons) Equals(o any) bool
- func (c *ChunkedCons) Equiv(o any) bool
- func (c *ChunkedCons) First() any
- func (c *ChunkedCons) Hash() uint32
- func (c *ChunkedCons) HashEq() uint32
- func (c *ChunkedCons) Meta() IPersistentMap
- func (c *ChunkedCons) More() ISeq
- func (c *ChunkedCons) Next() ISeq
- func (c *ChunkedCons) Seq() ISeq
- func (c *ChunkedCons) String() string
- func (c *ChunkedCons) WithMeta(meta IPersistentMap) any
- type Class
- type Comparer
- type CompilerError
- type Conjer
- type Cons
- func (c *Cons) Cons(o any) Conser
- func (c *Cons) Count() int
- func (c *Cons) Empty() IPersistentCollection
- func (c *Cons) Equals(o any) bool
- func (c *Cons) Equiv(o any) bool
- func (c *Cons) First() any
- func (c *Cons) Hash() uint32
- func (c *Cons) HashEq() uint32
- func (c *Cons) Meta() IPersistentMap
- func (c *Cons) More() ISeq
- func (c *Cons) Next() ISeq
- func (c *Cons) Reduce(f IFn) any
- func (c *Cons) ReduceInit(f IFn, init any) any
- func (c *Cons) Seq() ISeq
- func (c *Cons) String() string
- func (c *Cons) WithMeta(meta IPersistentMap) any
- type Conser
- type Counted
- type Counter
- type Cycle
- func (c *Cycle) Cons(o any) Conser
- func (c *Cycle) Count() int
- func (c *Cycle) Empty() IPersistentCollection
- func (c *Cycle) Equals(o any) bool
- func (c *Cycle) Equiv(o any) bool
- func (c *Cycle) First() interface{}
- func (c *Cycle) Hash() uint32
- func (c *Cycle) HashEq() uint32
- func (c *Cycle) IsRealized() bool
- func (c *Cycle) Meta() IPersistentMap
- func (c *Cycle) More() ISeq
- func (c *Cycle) Next() ISeq
- func (c *Cycle) Reduce(f IFn) interface{}
- func (c *Cycle) ReduceInit(f IFn, init interface{}) interface{}
- func (c *Cycle) Seq() ISeq
- func (c *Cycle) String() string
- func (c *Cycle) WithMeta(meta IPersistentMap) interface{}
- type Delay
- type EmptyList
- func (e *EmptyList) Cons(x any) Conser
- func (e *EmptyList) Count() int
- func (e *EmptyList) Empty() IPersistentCollection
- func (e *EmptyList) Equals(other any) bool
- func (e *EmptyList) Equiv(other any) bool
- func (e *EmptyList) First() any
- func (e *EmptyList) Hash() uint32
- func (e *EmptyList) HashEq() uint32
- func (e *EmptyList) IsEmpty() bool
- func (e *EmptyList) Meta() IPersistentMap
- func (e *EmptyList) More() ISeq
- func (e *EmptyList) Next() ISeq
- func (e *EmptyList) Peek() any
- func (e *EmptyList) Pop() IPersistentStack
- func (e *EmptyList) Reduce(f IFn) any
- func (e *EmptyList) ReduceInit(f IFn, init any) any
- func (e *EmptyList) Seq() ISeq
- func (e *EmptyList) String() string
- func (e *EmptyList) WithMeta(meta IPersistentMap) any
- type EmptyMapIterator
- type Environment
- type Equalser
- type Equiver
- type Error
- type EvalError
- type ExceptionInfo
- type FieldOrMethodResolver
- type FixedArityFn0
- type FixedArityFn1
- type FixedArityFn2
- type FixedArityFn3
- type FixedArityFn4
- type FixedArityFn5
- type FixedArityFn6
- type FixedArityFn7
- type FixedArityFn8
- type FixedArityFn9
- type FixedArityFn10
- type FixedArityFn11
- type FixedArityFn12
- type FixedArityFn13
- type FixedArityFn14
- type FixedArityFn15
- type FixedArityFn16
- type FixedArityFn17
- type FixedArityFn18
- type FixedArityFn19
- type FixedArityFn20
- type FnFunc
- type FnFunc0
- type FnFunc1
- type FnFunc2
- type FnFunc3
- type FnFunc4
- type FnFunc5
- type FnFunc6
- type FnFunc7
- type FnFunc8
- type FnFunc9
- type FnFunc10
- type FnFunc11
- type FnFunc12
- type FnFunc13
- type FnFunc14
- type FnFunc15
- type FnFunc16
- func (f FnFunc16) ApplyTo(args ISeq) any
- func (f FnFunc16) Invoke(args ...any) any
- func (f FnFunc16) Invoke16(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 any) any
- func (FnFunc16) IsFnValue()
- func (f FnFunc16) Meta() IPersistentMap
- func (f FnFunc16) WithMeta(_ IPersistentMap) any
- type FnFunc17
- func (f FnFunc17) ApplyTo(args ISeq) any
- func (f FnFunc17) Invoke(args ...any) any
- func (f FnFunc17) Invoke17(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 any) any
- func (FnFunc17) IsFnValue()
- func (f FnFunc17) Meta() IPersistentMap
- func (f FnFunc17) WithMeta(_ IPersistentMap) any
- type FnFunc18
- type FnFunc19
- type FnFunc20
- type FnValue
- type Future
- type GoMapSeq
- func (s *GoMapSeq) Cons(o any) Conser
- func (s *GoMapSeq) Count() int
- func (s *GoMapSeq) Empty() IPersistentCollection
- func (s *GoMapSeq) Equals(o any) bool
- func (s *GoMapSeq) Equiv(o any) bool
- func (s *GoMapSeq) First() any
- func (s *GoMapSeq) Hash() uint32
- func (s *GoMapSeq) HashEq() uint32
- func (s *GoMapSeq) KVReduce(f IFn, init any) any
- func (s *GoMapSeq) Meta() IPersistentMap
- func (s *GoMapSeq) More() ISeq
- func (s *GoMapSeq) Next() ISeq
- func (s *GoMapSeq) Reduce(f IFn) any
- func (s *GoMapSeq) ReduceInit(f IFn, init any) any
- func (s *GoMapSeq) Seq() ISeq
- func (s *GoMapSeq) String() string
- func (s *GoMapSeq) WithMeta(meta IPersistentMap) any
- type HashCollisionNode
- type Hasher
- type IAtom
- type IAtom2
- type IBlockingDeref
- type IChunk
- type IChunkedSeq
- type IDeref
- type IDrop
- type IEditableCollection
- type IExceptionInfo
- type IFn
- type IHashEq
- type IKVReduce
- type ILookup
- type IMapEntry
- type IMeta
- type IObj
- type IPending
- type IPersistentCollection
- type IPersistentList
- type IPersistentMap
- func GetExData(err error) IPersistentMap
- func GetThreadBindings() IPersistentMap
- func Merge(m1, m2 IPersistentMap) IPersistentMap
- func NewMap(keyVals ...any) IPersistentMap
- func NewMapUniqueKeys(keyVals ...any) IPersistentMap
- func NewPersistentArrayMapAsIfByAssoc(init []any) IPersistentMap
- func NewPersistentHashMap(keyvals ...any) IPersistentMap
- func NewStaticKeywordMap(shape *KeywordMapShape, values ...any) IPersistentMap
- func RecordAssocEx(record RecordValue, key, value any) IPersistentMap
- func RecordPersistentMap(record RecordValue) IPersistentMap
- func RecordWithout(record RecordValue, key any) IPersistentMap
- func SafeMerge(m1, m2 IPersistentMap) IPersistentMap
- type IPersistentSet
- type IPersistentStack
- type IPersistentVector
- type IRecord
- type IReduce
- type IReduceInit
- type IRef
- type ISeq
- func AllNamespaces() ISeq
- func Keys(x any) ISeq
- func NewCons(x any, xs any) ISeq
- func NewCycle(vals ISeq) ISeq
- func NewLazySeq(fn func() interface{}) ISeq
- func NewLongRange(start, end, step int64) (res ISeq)
- func NewMapKeySeq(s ISeq) ISeq
- func NewMapValSeq(s ISeq) ISeq
- func NewMappedSeq(fn any, source ISeq) ISeq
- func NewRange(start, end, step any) ISeq
- func NewRepeatN(count int64, x interface{}) ISeq
- func NewSliceSeq(x any) ISeq
- func Next(x interface{}) ISeq
- func RecordSeq(record RecordValue) ISeq
- func Seq(x interface{}) ISeq
- func Vals(x any) ISeq
- type ITransientAssociative
- type ITransientCollection
- type ITransientMap
- type ITransientSet
- type ITransientVector
- type IllegalArgumentError
- type IllegalStateError
- type IndexOutOfBoundsError
- type Indexed
- type IndexedSeq
- type Int64Reducer
- type Int64ReductionStepper
- type Int64StepReducible
- type Iterate
- func (it *Iterate) Cons(o any) Conser
- func (it *Iterate) Count() int
- func (it *Iterate) Empty() IPersistentCollection
- func (it *Iterate) Equals(o any) bool
- func (it *Iterate) Equiv(o any) bool
- func (it *Iterate) First() any
- func (it *Iterate) Hash() uint32
- func (it *Iterate) HashEq() uint32
- func (it *Iterate) IsRealized() bool
- func (it *Iterate) Meta() IPersistentMap
- func (it *Iterate) More() ISeq
- func (it *Iterate) Next() ISeq
- func (it *Iterate) Reduce(rf IFn) any
- func (it *Iterate) ReduceInit(rf IFn, start any) any
- func (it *Iterate) Seq() ISeq
- func (it *Iterate) String() string
- func (it *Iterate) WithMeta(meta IPersistentMap) any
- type Iterator
- type Keyword
- func (k Keyword) ApplyTo(args ISeq) interface{}
- func (k Keyword) Compare(other any) int
- func (k Keyword) Equals(v interface{}) bool
- func (k Keyword) Hash() uint32
- func (k Keyword) Invoke(args ...interface{}) interface{}
- func (k Keyword) Invoke1(coll interface{}) interface{}
- func (k Keyword) Invoke2(coll, defaultVal interface{}) interface{}
- func (k Keyword) Name() string
- func (k Keyword) Namespace() any
- func (k Keyword) String() string
- func (k Keyword) Sym() *Symbol
- type KeywordMapShape
- type LazySeq
- func (s *LazySeq) Cons(x interface{}) Conser
- func (s *LazySeq) Count() int
- func (s *LazySeq) Empty() IPersistentCollection
- func (s *LazySeq) Equals(o interface{}) bool
- func (s *LazySeq) Equiv(o interface{}) bool
- func (s *LazySeq) First() interface{}
- func (s *LazySeq) Hash() uint32
- func (s *LazySeq) HashEq() uint32
- func (s *LazySeq) IsRealized() bool
- func (s *LazySeq) Meta() IPersistentMap
- func (s *LazySeq) More() ISeq
- func (s *LazySeq) Next() ISeq
- func (s *LazySeq) Reduce(f IFn) interface{}
- func (s *LazySeq) ReduceInit(f IFn, init interface{}) interface{}
- func (s *LazySeq) Seq() ISeq
- func (s *LazySeq) String() string
- func (s *LazySeq) WithMeta(meta IPersistentMap) interface{}
- type List
- func (l *List) Cons(x any) Conser
- func (l *List) Count() int
- func (l *List) Empty() IPersistentCollection
- func (l *List) Equals(other any) bool
- func (l *List) Equiv(other any) bool
- func (l *List) First() any
- func (l *List) Hash() uint32
- func (l *List) HashEq() uint32
- func (l *List) IsEmpty() bool
- func (l *List) Item() any
- func (l *List) Meta() IPersistentMap
- func (l *List) More() ISeq
- func (l *List) Next() ISeq
- func (l *List) Peek() any
- func (l *List) Pop() IPersistentStack
- func (l *List) Reduce(f IFn) any
- func (l *List) ReduceInit(f IFn, init any) any
- func (l *List) Seq() ISeq
- func (l *List) String() string
- func (l *List) WithMeta(meta IPersistentMap) any
- type LockingTransactor
- type LongChunk
- type LongRange
- func (r *LongRange) ChunkedFirst() IChunk
- func (r *LongRange) ChunkedMore() ISeq
- func (r *LongRange) ChunkedNext() ISeq
- func (r *LongRange) Cons(o any) Conser
- func (r *LongRange) Count() int
- func (r *LongRange) Drop(n int) Sequential
- func (r *LongRange) Empty() IPersistentCollection
- func (r *LongRange) Equals(o any) bool
- func (r *LongRange) Equiv(o any) bool
- func (r *LongRange) First() any
- func (r *LongRange) Hash() uint32
- func (r *LongRange) HashEq() uint32
- func (r *LongRange) Meta() IPersistentMap
- func (r *LongRange) More() ISeq
- func (r *LongRange) Next() ISeq
- func (r *LongRange) Reduce(f IFn) any
- func (r *LongRange) ReduceInit(f IFn, init any) any
- func (r *LongRange) ReduceInt64Steps(reducer Int64ReductionStepper, initial int64) int64
- func (r *LongRange) Seq() ISeq
- func (r *LongRange) String() string
- func (r *LongRange) WithMeta(meta IPersistentMap) any
- type Map
- func (m *Map) ApplyTo(args ISeq) any
- func (m *Map) AsTransient() ITransientCollection
- func (m *Map) Assoc(k, v any) Associative
- func (m *Map) AssocEx(k, v any) IPersistentMap
- func (m *Map) Cons(x any) Conser
- func (m *Map) ContainsKey(k any) bool
- func (m *Map) Count() int
- func (m *Map) Empty() IPersistentCollection
- func (m *Map) EntryAt(k any) IMapEntry
- func (m *Map) Equiv(o any) bool
- func (m *Map) Hash() uint32
- func (m *Map) HashEq() uint32
- func (m *Map) Invoke(args ...any) any
- func (m *Map) KVReduce(f IFn, init any) any
- func (m *Map) Meta() IPersistentMap
- func (m *Map) Reduce(f IFn) any
- func (m *Map) ReduceInit(f IFn, init any) any
- func (m *Map) Seq() ISeq
- func (m *Map) String() string
- func (m *Map) ValAt(key any) any
- func (m *Map) ValAtDefault(key, def any) any
- func (m *Map) WithMeta(meta IPersistentMap) any
- func (m *Map) Without(k any) IPersistentMap
- type MapEntry
- func (me *MapEntry) ApplyTo(args ISeq) any
- func (me *MapEntry) Assoc(k, v any) Associative
- func (me *MapEntry) AssocN(i int, o any) IPersistentVector
- func (me *MapEntry) Compare(other any) int
- func (me *MapEntry) Cons(o any) Conser
- func (me *MapEntry) ContainsKey(k any) bool
- func (me *MapEntry) Count() int
- func (me *MapEntry) Empty() IPersistentCollection
- func (me *MapEntry) EntryAt(k any) IMapEntry
- func (me *MapEntry) Equiv(o any) bool
- func (me *MapEntry) GetKey() any
- func (me *MapEntry) GetValue() any
- func (me *MapEntry) HashEq() uint32
- func (me *MapEntry) Invoke(args ...any) any
- func (me *MapEntry) Key() any
- func (me *MapEntry) Length() int
- func (me *MapEntry) Nth(i int) any
- func (me *MapEntry) NthDefault(i int, d any) any
- func (me *MapEntry) Peek() any
- func (me *MapEntry) Pop() IPersistentStack
- func (me *MapEntry) RSeq() ISeq
- func (me *MapEntry) Seq() ISeq
- func (me *MapEntry) String() string
- func (me *MapEntry) Val() any
- func (me *MapEntry) ValAt(key any) any
- func (me *MapEntry) ValAtDefault(key, notFound any) any
- type MapIterator
- type MapKeySeq
- func (s *MapKeySeq) Cons(o any) Conser
- func (s *MapKeySeq) Count() int
- func (s *MapKeySeq) Empty() IPersistentCollection
- func (s *MapKeySeq) Equals(o any) bool
- func (s *MapKeySeq) Equiv(o any) bool
- func (s *MapKeySeq) First() any
- func (s *MapKeySeq) Hash() uint32
- func (s *MapKeySeq) HashEq() uint32
- func (s *MapKeySeq) Meta() IPersistentMap
- func (s *MapKeySeq) More() ISeq
- func (s *MapKeySeq) Next() ISeq
- func (s *MapKeySeq) Reduce(f IFn) any
- func (s *MapKeySeq) ReduceInit(f IFn, init any) any
- func (s *MapKeySeq) Seq() ISeq
- func (s *MapKeySeq) String() string
- func (s *MapKeySeq) WithMeta(meta IPersistentMap) any
- type MapSeq
- func (s *MapSeq) Cons(o any) Conser
- func (s *MapSeq) Count() int
- func (s *MapSeq) Drop(n int) Sequential
- func (s *MapSeq) Empty() IPersistentCollection
- func (s *MapSeq) Equals(o any) bool
- func (s *MapSeq) Equiv(o any) bool
- func (s *MapSeq) First() any
- func (s *MapSeq) Hash() uint32
- func (s *MapSeq) HashEq() uint32
- func (s *MapSeq) Meta() IPersistentMap
- func (s *MapSeq) More() ISeq
- func (s *MapSeq) Next() ISeq
- func (s *MapSeq) Reduce(f IFn) any
- func (s *MapSeq) ReduceInit(f IFn, init any) any
- func (s *MapSeq) Seq() ISeq
- func (s *MapSeq) String() string
- func (s *MapSeq) WithMeta(meta IPersistentMap) any
- type MapValSeq
- func (s *MapValSeq) Cons(o any) Conser
- func (s *MapValSeq) Count() int
- func (s *MapValSeq) Empty() IPersistentCollection
- func (s *MapValSeq) Equals(o any) bool
- func (s *MapValSeq) Equiv(o any) bool
- func (s *MapValSeq) First() any
- func (s *MapValSeq) Hash() uint32
- func (s *MapValSeq) HashEq() uint32
- func (s *MapValSeq) Meta() IPersistentMap
- func (s *MapValSeq) More() ISeq
- func (s *MapValSeq) Next() ISeq
- func (s *MapValSeq) Reduce(f IFn) any
- func (s *MapValSeq) ReduceInit(f IFn, init any) any
- func (s *MapValSeq) Seq() ISeq
- func (s *MapValSeq) String() string
- func (s *MapValSeq) WithMeta(meta IPersistentMap) any
- type MultiFn
- func (m *MultiFn) AddMethod(dispatchVal any, method IFn) *MultiFn
- func (m *MultiFn) ApplyTo(args ISeq) any
- func (m *MultiFn) GetDefaultDispatchVal() any
- func (m *MultiFn) GetDispatchFn() IFn
- func (m *MultiFn) GetHierarchy() IRef
- func (m *MultiFn) GetMethodTable() IPersistentMap
- func (m *MultiFn) GetName() string
- func (m *MultiFn) Invoke(args ...any) any
- func (m *MultiFn) PreferMethod(dispatchValX, dispatchValY any) *MultiFn
- func (m *MultiFn) PreferTable() IPersistentMap
- type Named
- type Namespace
- func (ns *Namespace) AddAlias(alias *Symbol, ns2 *Namespace)
- func (ns *Namespace) Aliases() IPersistentMap
- func (ns *Namespace) AlterMeta(alter IFn, args ISeq) IPersistentMap
- func (ns *Namespace) FindInternedVar(sym *Symbol) *Var
- func (ns *Namespace) GetAliases() IPersistentMap
- func (ns *Namespace) GetMapping(sym *Symbol) interface{}
- func (ns *Namespace) Import(export string, v interface{}) interface{}
- func (ns *Namespace) Intern(sym *Symbol) *Var
- func (ns *Namespace) InternWithValue(sym *Symbol, value interface{}, replaceRoot bool) *Var
- func (ns *Namespace) LookupAlias(sym *Symbol) *Namespace
- func (ns *Namespace) Mappings() IPersistentMap
- func (ns *Namespace) Meta() IPersistentMap
- func (ns *Namespace) Name() *Symbol
- func (ns *Namespace) Refer(sym *Symbol, v *Var) *Var
- func (ns *Namespace) ReferAll(src *Namespace, refs []NamespaceReference)
- func (ns *Namespace) ReferAllSnapshot(src *Namespace, excluded []string)
- func (ns *Namespace) ResetMeta(meta IPersistentMap) IPersistentMap
- func (ns *Namespace) String() string
- func (ns *Namespace) Unmap(sym *Symbol)
- type NamespaceReference
- type Node
- type NodeIterator
- type NodeSeq
- func (s *NodeSeq) Cons(obj any) Conser
- func (s *NodeSeq) Count() int
- func (s *NodeSeq) Empty() IPersistentCollection
- func (s *NodeSeq) Equals(obj any) bool
- func (s *NodeSeq) Equiv(obj any) bool
- func (s *NodeSeq) First() any
- func (s *NodeSeq) Hash() uint32
- func (s *NodeSeq) HashEq() uint32
- func (n *NodeSeq) Meta() IPersistentMap
- func (s *NodeSeq) More() ISeq
- func (s *NodeSeq) Next() ISeq
- func (s *NodeSeq) Seq() ISeq
- func (s *NodeSeq) String() string
- func (s *NodeSeq) WithMeta(meta IPersistentMap) any
- type Nther
- type NumberMethods
- func (nm *NumberMethods) Add(x, y any) any
- func (nm *NumberMethods) AddP(x, y any) any
- func (nm *NumberMethods) And(x, y any) any
- func (nm *NumberMethods) AndNot(x, y any) any
- func (nm *NumberMethods) BooleanArray(sizeOrSeq any) []bool
- func (nm *NumberMethods) BooleanArrayInit(size int, init any) []bool
- func (nm *NumberMethods) Booleans(x any) []bool
- func (nm *NumberMethods) ByteArray(sizeOrSeq any) []int8
- func (nm *NumberMethods) ByteArrayInit(size int, initOrSeq any) []int8
- func (nm *NumberMethods) Bytes(x any) []int8
- func (nm *NumberMethods) CharArray(sizeOrSeq any) []Char
- func (nm *NumberMethods) CharArrayInit(size int, init any) []Char
- func (nm *NumberMethods) Chars(x any) []Char
- func (nm *NumberMethods) ClearBit(x, y any) int64
- func (nm *NumberMethods) Compare(x, y any) int
- func (nm *NumberMethods) Dec(x any) any
- func (nm *NumberMethods) DecP(v any) any
- func (nm *NumberMethods) Divide(x, y any) any
- func (nm *NumberMethods) DoubleArray(sizeOrSeq any) []float64
- func (nm *NumberMethods) DoubleArrayInit(size int, init any) []float64
- func (nm *NumberMethods) Doubles(x any) []float64
- func (nm *NumberMethods) Equiv(x, y any) bool
- func (nm *NumberMethods) FlipBit(x, y any) int64
- func (nm *NumberMethods) FloatArray(sizeOrSeq any) []float32
- func (nm *NumberMethods) FloatArrayInit(size int, init any) []float32
- func (nm *NumberMethods) Floats(x any) []float32
- func (nm *NumberMethods) Gt(x, y any) bool
- func (nm *NumberMethods) Gte(x, y any) bool
- func (nm *NumberMethods) Inc(v any) any
- func (nm *NumberMethods) IncP(v any) any
- func (nm *NumberMethods) IntArray(sizeOrSeq any) []int
- func (nm *NumberMethods) IntArrayInit(size int, init any) []int
- func (nm *NumberMethods) Ints(x any) []int
- func (nm *NumberMethods) IsNeg(x any) bool
- func (nm *NumberMethods) IsPos(x any) bool
- func (nm *NumberMethods) IsZero(x any) bool
- func (nm *NumberMethods) LongArray(sizeOrSeq any) []int64
- func (nm *NumberMethods) LongArrayInit(size int, init any) []int64
- func (nm *NumberMethods) Longs(x any) []int64
- func (nm *NumberMethods) Lt(x, y any) bool
- func (nm *NumberMethods) Lte(x, y any) bool
- func (nm *NumberMethods) Max(x, y any) any
- func (nm *NumberMethods) Min(x, y any) any
- func (nm *NumberMethods) Minus(x, y any) any
- func (nm *NumberMethods) MinusP(x, y any) any
- func (nm *NumberMethods) Multiply(x, y any) any
- func (nm *NumberMethods) MultiplyP(x, y any) any
- func (nm *NumberMethods) Not(x any) any
- func (nm *NumberMethods) Num(x any) any
- func (nm *NumberMethods) Or(x, y any) any
- func (nm *NumberMethods) Quotient(x, y any) any
- func (nm *NumberMethods) Rationalize(x any) any
- func (nm *NumberMethods) Remainder(x, y any) any
- func (nm *NumberMethods) SetBit(x, y any) any
- func (nm *NumberMethods) ShiftLeft(x, y any) int64
- func (nm *NumberMethods) ShiftRight(x, y any) int64
- func (nm *NumberMethods) ShortArray(sizeOrSeq any) []int16
- func (nm *NumberMethods) ShortArrayInit(size int, init any) []int16
- func (nm *NumberMethods) Shorts(x any) []int16
- func (nm *NumberMethods) TestBit(x, y any) bool
- func (nm *NumberMethods) UncheckedAdd(x, y any) any
- func (nm *NumberMethods) UncheckedDec(x any) any
- func (nm *NumberMethods) UncheckedIntDivide(x, y int) any
- func (nm *NumberMethods) Unchecked_inc(v any) any
- func (nm *NumberMethods) Unchecked_int_add(x, y any) any
- func (nm *NumberMethods) Unchecked_int_dec(x any) any
- func (nm *NumberMethods) Unchecked_int_inc(x any) any
- func (nm *NumberMethods) Unchecked_int_multiply(x, y any) any
- func (nm *NumberMethods) Unchecked_int_negate(x any) any
- func (nm *NumberMethods) Unchecked_int_remainder(x, y any) any
- func (nm *NumberMethods) Unchecked_int_subtract(x, y any) any
- func (nm *NumberMethods) Unchecked_minus(x, y any) any
- func (nm *NumberMethods) Unchecked_multiply(x, y any) any
- func (nm *NumberMethods) Unchecked_negate(x any) any
- func (nm *NumberMethods) UnsignedShiftRight(x, y any) int64
- func (nm *NumberMethods) Xor(x, y any) any
- type Object
- type Pair
- type PersistentHashMap
- func (m *PersistentHashMap) ApplyTo(args ISeq) any
- func (m *PersistentHashMap) Assoc(key, val any) Associative
- func (m *PersistentHashMap) AssocEx(key, val any) IPersistentMap
- func (m *PersistentHashMap) Cons(o any) Conser
- func (m *PersistentHashMap) ContainsKey(k any) bool
- func (m *PersistentHashMap) Count() int
- func (m *PersistentHashMap) Empty() IPersistentCollection
- func (m *PersistentHashMap) EntryAt(key any) IMapEntry
- func (m *PersistentHashMap) Equiv(o any) bool
- func (m *PersistentHashMap) Hash() uint32
- func (m *PersistentHashMap) HashEq() uint32
- func (m *PersistentHashMap) Invoke(args ...any) any
- func (m *PersistentHashMap) Meta() IPersistentMap
- func (m *PersistentHashMap) Reduce(f IFn) any
- func (m *PersistentHashMap) ReduceInit(f IFn, init any) any
- func (m *PersistentHashMap) Seq() ISeq
- func (m *PersistentHashMap) String() string
- func (m *PersistentHashMap) ValAt(key any) any
- func (m *PersistentHashMap) ValAtDefault(key, notFound any) any
- func (m *PersistentHashMap) WithMeta(meta IPersistentMap) any
- func (m *PersistentHashMap) Without(key any) IPersistentMap
- type PersistentHashSet
- type PersistentQueue
- func (q *PersistentQueue) ApplyTo(args ISeq) any
- func (q *PersistentQueue) Cons(value any) Conser
- func (q *PersistentQueue) Count() int
- func (q *PersistentQueue) Empty() IPersistentCollection
- func (q *PersistentQueue) Equals(other any) bool
- func (q *PersistentQueue) Equiv(other any) bool
- func (q *PersistentQueue) Invoke(args ...any) any
- func (q *PersistentQueue) Meta() IPersistentMap
- func (q *PersistentQueue) Peek() any
- func (q *PersistentQueue) Pop() IPersistentStack
- func (q *PersistentQueue) Seq() ISeq
- func (q *PersistentQueue) String() string
- func (q *PersistentQueue) WithMeta(meta IPersistentMap) any
- type PersistentStructMap
- func (m *PersistentStructMap) ApplyTo(args ISeq) any
- func (m *PersistentStructMap) Assoc(k any, v any) Associative
- func (m *PersistentStructMap) AssocEx(k, v any) IPersistentMap
- func (m *PersistentStructMap) Cons(x any) Conser
- func (m *PersistentStructMap) ContainsKey(k any) bool
- func (m *PersistentStructMap) Count() int
- func (m *PersistentStructMap) Empty() IPersistentCollection
- func (m *PersistentStructMap) EntryAt(k any) IMapEntry
- func (m *PersistentStructMap) Equiv(o any) bool
- func (m *PersistentStructMap) Hash() uint32
- func (m *PersistentStructMap) HashEq() uint32
- func (m *PersistentStructMap) Invoke(args ...any) any
- func (m *PersistentStructMap) Meta() IPersistentMap
- func (m *PersistentStructMap) Seq() ISeq
- func (m *PersistentStructMap) ValAt(key any) any
- func (m *PersistentStructMap) ValAtDefault(key, def any) any
- func (m *PersistentStructMap) WithMeta(meta IPersistentMap) any
- func (m *PersistentStructMap) Without(k any) IPersistentMap
- type PersistentStructMapDef
- type PersistentTreeMap
- type PersistentTreeSet
- type PersistentVector
- type Range
- func (r *Range) ChunkedFirst() IChunk
- func (r *Range) ChunkedMore() ISeq
- func (r *Range) ChunkedNext() ISeq
- func (r *Range) Cons(val any) Conser
- func (r *Range) Count() int
- func (r *Range) Empty() IPersistentCollection
- func (r *Range) Equals(o any) bool
- func (r *Range) Equiv(o any) bool
- func (r *Range) First() any
- func (r *Range) ForceChunk()
- func (r *Range) Hash() uint32
- func (r *Range) HashEq() uint32
- func (r *Range) Meta() IPersistentMap
- func (r *Range) More() ISeq
- func (r *Range) Next() ISeq
- func (r *Range) Reduce(f IFn) any
- func (r *Range) ReduceInit(f IFn, init any) any
- func (r *Range) Seq() ISeq
- func (r *Range) String() string
- func (r *Range) WithMeta(meta IPersistentMap) any
- type Ratio
- func (r *Ratio) Abs() *Ratio
- func (r *Ratio) Add(other *Ratio) any
- func (r *Ratio) BigIntegerValue() *big.Int
- func (r *Ratio) Cmp(other *Ratio) int
- func (r *Ratio) Denominator() *big.Int
- func (r *Ratio) Divide(other *Ratio) any
- func (r *Ratio) Equals(other interface{}) bool
- func (r *Ratio) GT(other *Ratio) bool
- func (r *Ratio) GTE(other *Ratio) bool
- func (r *Ratio) LT(other *Ratio) bool
- func (r *Ratio) LTE(other *Ratio) bool
- func (r *Ratio) Multiply(other *Ratio) any
- func (r *Ratio) Negate() *Ratio
- func (r *Ratio) Numerator() *big.Int
- func (r *Ratio) Quotient(other *Ratio) any
- func (r *Ratio) String() string
- func (r *Ratio) Sub(other *Ratio) any
- type ReadablePrinter
- type Record
- func (r *Record) ApplyTo(args ISeq) any
- func (r *Record) Assoc(key, value any) Associative
- func (r *Record) AssocEx(key, value any) IPersistentMap
- func (r *Record) Cons(value any) Conser
- func (r *Record) ContainsKey(key any) bool
- func (r *Record) Count() int
- func (r *Record) Empty() IPersistentCollection
- func (r *Record) EntryAt(key any) IMapEntry
- func (r *Record) Equiv(other any) bool
- func (r *Record) Hash() uint32
- func (r *Record) HashEq() uint32
- func (r *Record) Invoke(args ...any) any
- func (r *Record) Meta() IPersistentMap
- func (r *Record) RecordExtMap() IPersistentMap
- func (r *Record) RecordField(index int) any
- func (r *Record) RecordMeta() IPersistentMap
- func (r *Record) RecordType() *RecordType
- func (r *Record) RecordWithExtMap(ext IPersistentMap) RecordValue
- func (r *Record) RecordWithField(index int, value any) RecordValue
- func (r *Record) RecordWithMeta(meta IPersistentMap) RecordValue
- func (r *Record) Reduce(f IFn) any
- func (r *Record) ReduceInit(f IFn, initial any) any
- func (r *Record) Seq() ISeq
- func (r *Record) String() string
- func (r *Record) ValAt(key any) any
- func (r *Record) ValAtDefault(key, fallback any) any
- func (r *Record) WithMeta(meta IPersistentMap) any
- func (r *Record) Without(key any) IPersistentMap
- type RecordConstructor
- type RecordMarker
- type RecordType
- func (t *RecordType) FieldCount() int
- func (t *RecordType) FieldIndex(key Keyword) (int, bool)
- func (t *RecordType) FieldKeys() []Keyword
- func (t *RecordType) FieldNames() []string
- func (t *RecordType) FullName() string
- func (t *RecordType) Name() string
- func (t *RecordType) Namespace() string
- func (t *RecordType) String() string
- type RecordValue
- type RecurError
- type RecurTarget
- type Reduced
- type Ref
- type RegexpMatcher
- func (m *RegexpMatcher) AppendReplacement(sb io.Writer, replacement string) *RegexpMatcher
- func (m *RegexpMatcher) AppendTail(sb io.Writer)
- func (m *RegexpMatcher) End() int
- func (m *RegexpMatcher) Find() bool
- func (m *RegexpMatcher) Group() string
- func (m *RegexpMatcher) GroupCount() int
- func (m *RegexpMatcher) GroupInt(group int) any
- func (m *RegexpMatcher) Matches() bool
- func (m *RegexpMatcher) ResolveFieldOrMethod(name string) (interface{}, bool)
- type Repeat
- func (r *Repeat) Cons(val any) Conser
- func (r *Repeat) Count() int
- func (r *Repeat) Empty() IPersistentCollection
- func (r *Repeat) Equals(o any) bool
- func (r *Repeat) Equiv(o any) bool
- func (r *Repeat) First() interface{}
- func (r *Repeat) Hash() uint32
- func (r *Repeat) HashEq() uint32
- func (r *Repeat) Meta() IPersistentMap
- func (r *Repeat) More() ISeq
- func (r *Repeat) Next() ISeq
- func (r *Repeat) Reduce(f IFn) interface{}
- func (r *Repeat) ReduceInit(f IFn, start interface{}) interface{}
- func (r *Repeat) Seq() ISeq
- func (r *Repeat) String() string
- func (r *Repeat) WithMeta(meta IPersistentMap) any
- type Reversible
- type RoundingMode
- type Seqable
- type Sequential
- type Set
- func (s *Set) ApplyTo(args ISeq) any
- func (s *Set) AsTransient() ITransientCollection
- func (s *Set) Cons(v any) Conser
- func (s *Set) Contains(v any) bool
- func (s *Set) Count() int
- func (s *Set) Disjoin(v any) IPersistentSet
- func (s *Set) Empty() IPersistentCollection
- func (s *Set) Equals(v2 any) bool
- func (s *Set) Equiv(o any) bool
- func (s *Set) Get(key any) any
- func (s *Set) Hash() uint32
- func (s *Set) HashEq() uint32
- func (s *Set) Invoke(args ...any) any
- func (s *Set) IsEmpty() bool
- func (s *Set) Meta() IPersistentMap
- func (s *Set) Reduce(f IFn) any
- func (s *Set) ReduceInit(f IFn, init any) any
- func (s *Set) Seq() ISeq
- func (s *Set) String() string
- func (s *Set) WithMeta(meta IPersistentMap) any
- type SliceChunk
- type SliceSeq
- func (s *SliceSeq) Cons(o any) Conser
- func (s *SliceSeq) Count() int
- func (s *SliceSeq) Empty() IPersistentCollection
- func (s *SliceSeq) Equals(o any) bool
- func (s *SliceSeq) Equiv(o any) bool
- func (s *SliceSeq) First() any
- func (s *SliceSeq) Hash() uint32
- func (s *SliceSeq) HashEq() uint32
- func (s *SliceSeq) Meta() IPersistentMap
- func (s *SliceSeq) More() ISeq
- func (s *SliceSeq) Next() ISeq
- func (s *SliceSeq) Reduce(f IFn) any
- func (s *SliceSeq) ReduceInit(f IFn, start any) any
- func (s *SliceSeq) Seq() ISeq
- func (s *SliceSeq) String() string
- func (s *SliceSeq) WithMeta(meta IPersistentMap) any
- type Sorted
- type SortedMap
- func (s *SortedMap) ApplyTo(args ISeq) any
- func (s *SortedMap) Assoc(key, val any) Associative
- func (s *SortedMap) AssocEx(key, val any) IPersistentMap
- func (s *SortedMap) Comparator() IFn
- func (s *SortedMap) Cons(o any) Conser
- func (s *SortedMap) ContainsKey(key any) bool
- func (s *SortedMap) Count() int
- func (s *SortedMap) Empty() IPersistentCollection
- func (s *SortedMap) EntryAt(key any) IMapEntry
- func (s *SortedMap) EntryKey(entry any) any
- func (s *SortedMap) Equals(o any) bool
- func (s *SortedMap) Equiv(o any) bool
- func (s *SortedMap) Hash() uint32
- func (s *SortedMap) HashEq() uint32
- func (s *SortedMap) Invoke(args ...any) any
- func (s *SortedMap) IsEmpty() bool
- func (s *SortedMap) Meta() IPersistentMap
- func (s *SortedMap) RSeq() ISeq
- func (s *SortedMap) ReduceInit(f IFn, init any) any
- func (s *SortedMap) Rseq() ISeq
- func (s *SortedMap) Seq() ISeq
- func (s *SortedMap) String() string
- func (s *SortedMap) ValAt(key any) any
- func (s *SortedMap) ValAtDefault(key, def any) any
- func (s *SortedMap) WithMeta(meta IPersistentMap) any
- func (s *SortedMap) Without(key any) IPersistentMap
- type SortedSet
- func (s *SortedSet) Comparator() IFn
- func (s *SortedSet) Cons(v any) Conser
- func (s *SortedSet) Disjoin(v any) IPersistentSet
- func (s *SortedSet) Empty() IPersistentCollection
- func (s *SortedSet) EntryKey(entry any) any
- func (s *SortedSet) RSeq() ISeq
- func (s *SortedSet) Reduce(f IFn) any
- func (s *SortedSet) ReduceInit(f IFn, init any) any
- func (s *SortedSet) Rseq() ISeq
- func (s *SortedSet) Seq() ISeq
- func (s *SortedSet) WithMeta(meta IPersistentMap) any
- type StackFrame
- type Stacker
- type StringMethod
- type StringSeq
- func (s *StringSeq) Cons(o any) Conser
- func (s *StringSeq) Count() int
- func (s *StringSeq) Drop(n int) Sequential
- func (s *StringSeq) Empty() IPersistentCollection
- func (s *StringSeq) Equals(o any) bool
- func (s *StringSeq) Equiv(o any) bool
- func (s *StringSeq) First() any
- func (s *StringSeq) Hash() uint32
- func (s *StringSeq) HashEq() uint32
- func (s *StringSeq) Index() int
- func (s *StringSeq) Meta() IPersistentMap
- func (s *StringSeq) More() ISeq
- func (s *StringSeq) Next() ISeq
- func (s *StringSeq) ReduceInit(f IFn, init any) any
- func (s *StringSeq) Seq() ISeq
- func (s *StringSeq) String() string
- func (s *StringSeq) WithMeta(meta IPersistentMap) any
- type SubVector
- func (v *SubVector) ApplyTo(args ISeq) any
- func (v *SubVector) Assoc(key, val interface{}) Associative
- func (v *SubVector) AssocN(i int, val interface{}) IPersistentVector
- func (v *SubVector) Compare(other any) int
- func (v *SubVector) Cons(val interface{}) Conser
- func (v *SubVector) ContainsKey(key interface{}) bool
- func (v *SubVector) Count() int
- func (v *SubVector) Empty() IPersistentCollection
- func (v *SubVector) EntryAt(key interface{}) IMapEntry
- func (v *SubVector) Equals(v2 interface{}) bool
- func (v *SubVector) Equiv(v2 interface{}) bool
- func (v *SubVector) HashEq() uint32
- func (v *SubVector) Invoke(args ...any) any
- func (v *SubVector) IsEmpty() bool
- func (v *SubVector) Length() int
- func (v *SubVector) Meta() IPersistentMap
- func (v *SubVector) Nth(i int) interface{}
- func (v *SubVector) NthDefault(i int, def interface{}) interface{}
- func (v *SubVector) Peek() interface{}
- func (v *SubVector) Pop() IPersistentStack
- func (v *SubVector) RSeq() ISeq
- func (v *SubVector) Reduce(f IFn) any
- func (v *SubVector) ReduceInit(f IFn, init any) any
- func (v *SubVector) Seq() ISeq
- func (v *SubVector) ValAt(i interface{}) interface{}
- func (v *SubVector) ValAtDefault(k, def interface{}) interface{}
- func (v *SubVector) WithMeta(meta IPersistentMap) interface{}
- type Symbol
- func (s *Symbol) ApplyTo(args ISeq) any
- func (s *Symbol) Compare(other any) int
- func (s *Symbol) Equals(v any) bool
- func (s *Symbol) FullName() string
- func (s *Symbol) HasNamespace() bool
- func (s *Symbol) Hash() uint32
- func (s *Symbol) Invoke(args ...any) any
- func (s *Symbol) Meta() IPersistentMap
- func (s *Symbol) Name() string
- func (s *Symbol) Namespace() string
- func (s *Symbol) String() string
- func (s *Symbol) WithMeta(meta IPersistentMap) any
- type TaggedLiteral
- func (t *TaggedLiteral) Equals(other any) bool
- func (t *TaggedLiteral) Equiv(other any) bool
- func (t *TaggedLiteral) Form() any
- func (t *TaggedLiteral) Meta() IPersistentMap
- func (t *TaggedLiteral) String() string
- func (t *TaggedLiteral) Tag() *Symbol
- func (t *TaggedLiteral) ValAt(key any) any
- func (t *TaggedLiteral) ValAtDefault(key, notFound any) any
- func (t *TaggedLiteral) WithMeta(meta IPersistentMap) any
- type TimeoutError
- type TransientMap
- func (m *TransientMap) ApplyTo(args ISeq) any
- func (m *TransientMap) Assoc(k, v any) Associative
- func (m *TransientMap) Conj(v any) Conjer
- func (m *TransientMap) Invoke(args ...any) any
- func (m *TransientMap) Meta() IPersistentMap
- func (m *TransientMap) Persistent() IPersistentCollection
- func (m *TransientMap) Reduce(f IFn) any
- func (m *TransientMap) ReduceInit(f IFn, init any) any
- func (m *TransientMap) Without(key any) IPersistentMap
- type TransientSet
- type TransientVector
- func (t *TransientVector) ApplyTo(args ISeq) any
- func (t *TransientVector) Assoc(key, val any) ITransientAssociative
- func (t *TransientVector) AssocN(i int, val any) ITransientVector
- func (t *TransientVector) Conj(o any) Conjer
- func (t *TransientVector) Count() int
- func (t *TransientVector) Invoke(args ...any) any
- func (t *TransientVector) Nth(i int) any
- func (t *TransientVector) NthDefault(i int, def any) any
- func (t *TransientVector) Persistent() IPersistentCollection
- func (t *TransientVector) Pop() ITransientVector
- func (t *TransientVector) ValAt(i any) any
- func (t *TransientVector) ValAtDefault(k, def any) any
- type UnboundVar
- type UnsupportedOperationError
- type Var
- func InternVar(ns *Namespace, sym *Symbol, root interface{}, replaceRoot bool) *Var
- func InternVarName(nsSym, nameSym *Symbol) *Var
- func InternVarReplaceRoot(ns *Namespace, sym *Symbol, root interface{}) *Var
- func NewVar(ns *Namespace, sym *Symbol) *Var
- func NewVarWithRoot(ns *Namespace, sym *Symbol, root interface{}) *Var
- func (v *Var) AddWatch(key interface{}, fn IFn) IRef
- func (v *Var) AlterMeta(alter IFn, args ISeq) IPersistentMap
- func (v *Var) AlterRoot(alter IFn, args ISeq) interface{}
- func (v *Var) ApplyTo(args ISeq) interface{}
- func (v *Var) BindRoot(root interface{})
- func (v *Var) Deref() interface{}
- func (v *Var) Get() interface{}
- func (v *Var) HasRoot() bool
- func (v *Var) Hash() uint32
- func (v *Var) Invoke(args ...interface{}) interface{}
- func (v *Var) IsBound() bool
- func (v *Var) IsDynamic() bool
- func (v *Var) IsMacro() bool
- func (v *Var) IsPublic() bool
- func (v *Var) Meta() IPersistentMap
- func (v *Var) Namespace() *Namespace
- func (v *Var) RemoveWatch(key interface{})
- func (v *Var) RootVersion() *VarRootVersion
- func (v *Var) Set(val interface{}) interface{}
- func (v *Var) SetDynamic() *Var
- func (v *Var) SetMacro()
- func (v *Var) SetMeta(meta IPersistentMap)
- func (v *Var) SetMetaLazy(fn func() IPersistentMap)
- func (v *Var) SetValidator(vf IFn)
- func (v *Var) String() string
- func (v *Var) Symbol() *Symbol
- func (v *Var) ToSymbol() *Symbol
- func (v *Var) Validator() IFn
- func (v *Var) Watches() IPersistentMap
- type VarRootVersion
- type VariadicFn
- type Vector
- func (v *Vector) ApplyTo(args ISeq) any
- func (v *Vector) AsTransient() ITransientCollection
- func (v *Vector) Assoc(key, val any) Associative
- func (v *Vector) AssocN(i int, val any) IPersistentVector
- func (v *Vector) Compare(other any) int
- func (v *Vector) Cons(x any) Conser
- func (v *Vector) ContainsKey(key any) bool
- func (v *Vector) Count() int
- func (v *Vector) Drop(n int) Sequential
- func (v *Vector) Empty() IPersistentCollection
- func (v *Vector) EntryAt(key any) IMapEntry
- func (v *Vector) Equals(v2 any) bool
- func (v *Vector) Equiv(v2 any) bool
- func (v *Vector) Hash() uint32
- func (v *Vector) HashEq() uint32
- func (v *Vector) IndexOf(value any) int
- func (v *Vector) Invoke(args ...any) any
- func (v *Vector) IsEmpty() bool
- func (v *Vector) KVReduce(f IFn, init any) any
- func (v *Vector) LastIndexOf(value any) int
- func (v *Vector) Length() int
- func (v *Vector) Meta() IPersistentMap
- func (v *Vector) Nth(i int) any
- func (v *Vector) NthDefault(i int, def any) any
- func (v *Vector) Peek() any
- func (v *Vector) Pop() IPersistentStack
- func (v *Vector) RSeq() ISeq
- func (v *Vector) Reduce(f IFn) any
- func (v *Vector) ReduceInit(f IFn, init any) any
- func (v *Vector) ReplaceLast(val any) *Vector
- func (v *Vector) Rseq() ISeq
- func (v *Vector) Seq() ISeq
- func (v *Vector) String() string
- func (v *Vector) ValAt(i any) any
- func (v *Vector) ValAtDefault(k, def any) any
- func (v *Vector) WithMeta(meta IPersistentMap) any
- type Volatile
Constants ¶
const ( CategoryInteger = iota CategoryFloating CategoryDecimal CategoryRatio )
const ( // PersistentArrayMapInlineKeyValueCount lets the compiler preserve the // one-allocation constructor for maps whose entries fit inline. PersistentArrayMapInlineKeyValueCount = arrayMapInlineSize // PersistentArrayMapMaxKeywordKeyValueCount is the largest keyword-only // literal that should use the linear persistent-array-map representation. PersistentArrayMapMaxKeywordKeyValueCount = arrayMapKeywordThreshold )
Variables ¶
var ( BuiltinTypes = map[string]reflect.Type{ "any": reflect.TypeOf((*interface{})(nil)).Elem(), "bool": reflect.TypeOf(false), "uint8": reflect.TypeOf(uint8(0)), "uint16": reflect.TypeOf(uint16(0)), "uint32": reflect.TypeOf(uint32(0)), "uint64": reflect.TypeOf(uint64(0)), "int8": reflect.TypeOf(int8(0)), "int16": reflect.TypeOf(int16(0)), "int32": reflect.TypeOf(int32(0)), "int64": reflect.TypeOf(int64(0)), "float32": reflect.TypeOf(float32(0)), "float64": reflect.TypeOf(float64(0)), "complex64": reflect.TypeOf(complex64(0)), "complex128": reflect.TypeOf(complex128(0)), "string": reflect.TypeOf(""), "int": reflect.TypeOf(int(0)), "uint": reflect.TypeOf(uint(0)), "uintptr": reflect.TypeOf(uintptr(0)), "byte": reflect.TypeOf(byte(0)), "rune": reflect.TypeOf(rune(0)), "error": reflect.TypeOf((*error)(nil)).Elem(), } Builtins = map[string]interface{}{ "append": FnFunc(func(args ...any) any { return GoAppend(args[0], args[1:]...) }), "copy": FnFunc2(func(a, b any) any { return GoCopy(a, b) }), "delete": FnFunc2(func(a, b any) any { GoDelete(a, b) return nil }), "len": FnFunc1(func(a any) any { return GoLen(a) }), "cap": FnFunc1(func(a any) any { return GoCap(a) }), "make": FnFunc(func(args ...any) any { return GoMake(args[0].(reflect.Type), args[1:]...) }), "new": FnFunc1(func(a any) any { return GoNew(a.(reflect.Type)) }), "complex": FnFunc2(func(a, b any) any { return GoComplex(a, b) }), "real": FnFunc1(func(a any) any { return GoReal(a) }), "imag": FnFunc1(func(a any) any { return GoImag(a) }), "close": FnFunc1(func(a any) any { GoClose(a) return nil }), "panic": FnFunc1(func(a any) any { GoPanic(a) return nil }), "slice-of": FnFunc1(func(a any) any { return reflect.SliceOf(a.(reflect.Type)) }), "ptr-to": FnFunc1(func(a any) any { return reflect.PtrTo(a.(reflect.Type)) }), "chan-of": FnFunc1(func(a any) any { return GoChanOf(a.(reflect.Type)) }), "<-chan-of": FnFunc1(func(a any) any { return GoRecvChanOf(a.(reflect.Type)) }), "chan<--of": FnFunc1(func(a any) any { return GoSendChanOf(a.(reflect.Type)) }), "map-of": FnFunc2(func(a, b any) any { return reflect.MapOf(a.(reflect.Type), b.(reflect.Type)) }), "func-of": FnFunc3(func(a, b, c any) any { return reflect.FuncOf(a.([]reflect.Type), b.([]reflect.Type), c.(bool)) }), "array-of": FnFunc2(func(a, b any) any { return reflect.ArrayOf(MustAsInt(a), b.(reflect.Type)) }), "deref": FnFunc1(func(a any) any { return GoDeref(a) }), "index": FnFunc2(func(a, b any) any { return GoIndex(a, b) }), "slice": FnFunc(func(args ...any) any { return GoSlice(args[0], args[1:]...) }), "map-index": FnFunc2(func(a, b any) any { return GoMapIndex(a, b) }), "set-map-index": FnFunc3(func(a, b, c any) any { GoSetMapIndex(a, b, c) return nil }), "send": FnFunc2(func(a, b any) any { GoSend(a, b) return nil }), "recv": FnFunc1(func(a any) any { val, ok := GoRecv(a) return NewVector(val, ok) }), } )
var ( KWTag = NewKeyword("tag") KWFile = NewKeyword("file") KWLine = NewKeyword("line") KWColumn = NewKeyword("column") KWEndLine = NewKeyword("end-line") KWEndColumn = NewKeyword("end-column") KWCtxExpr = NewKeyword("ctx/expr") KWCtxReturn = NewKeyword("ctx/return") KWCtxStatement = NewKeyword("ctx/statement") KWTopLevel = NewKeyword("top-level") KWEnv = NewKeyword("env") KWContext = NewKeyword("context") KWIsBody = NewKeyword("body?") KWLoopId = NewKeyword("loop-id") KWBinding = NewKeyword("binding") KWLoopLocals = NewKeyword("loop-locals") KWInTry = NewKeyword("in-try") KWCatch = NewKeyword("catch") KWDoc = NewKeyword("doc") KWOnce = NewKeyword("once") KWHashEquiv = NewKeyword("hash-equiv") KWBool = NewKeyword("bool") KWKeyword = NewKeyword("keyword") KWSymbol = NewKeyword("symbol") KWString = NewKeyword("string") KWSeq = NewKeyword("seq") KWChar = NewKeyword("char") KWRegex = NewKeyword("regex") KWNumber = NewKeyword("number") KWUnknown = NewKeyword("unknown") KWCaseNode = NewKeyword("case-node") KWArgId = NewKeyword("arg-id") KWArg = NewKeyword("arg") KWFnMethod = NewKeyword("fn-method") KWNamespaces = NewKeyword("namespaces") KWAliases = NewKeyword("aliases") KWMappings = NewKeyword("mappings") KWNil = NewKeyword("nil") KWHostField = NewKeyword("host-field") KWLetfn = NewKeyword("letfn") KWCompact = NewKeyword("compact") KWSparse = NewKeyword("sparse") KWInt = NewKeyword("int") KWHashIdentity = NewKeyword("hash-identity") KWArglists = NewKeyword("arglists") KWCatches = NewKeyword("catches") KWLocals = NewKeyword("locals") KWMutable = NewKeyword("mutable") KWType = NewKeyword("type") KWIsLiteral = NewKeyword("literal?") KWIsAssignable = NewKeyword("assignable?") KWMethods = NewKeyword("methods") KWIsVariadic = NewKeyword("variadic?") KWMaxFixedArity = NewKeyword("max-fixed-arity") KWLocal = NewKeyword("local") KWName = NewKeyword("name") KWFixedArity = NewKeyword("fixed-arity") KWBody = NewKeyword("body") KWParams = NewKeyword("params") KWOp = NewKeyword("op") KWForm = NewKeyword("form") KWConst = NewKeyword("const") KWDef = NewKeyword("def") KWSetBang = NewKeyword("set!") KWMaybeClass = NewKeyword("maybe-class") KWWithMeta = NewKeyword("with-meta") KWArgs = NewKeyword("args") KWBindings = NewKeyword("bindings") KWCase = NewKeyword("case") KWClass = NewKeyword("class") KWDefault = NewKeyword("default") KWDo = NewKeyword("do") KWElse = NewKeyword("else") KWException = NewKeyword("exception") KWExpr = NewKeyword("expr") KWExprs = NewKeyword("exprs") KWField = NewKeyword("field") KWFinally = NewKeyword("finally") KWFn = NewKeyword("fn") KWHostCall = NewKeyword("host-call") KWHostInterop = NewKeyword("host-interop") KWIf = NewKeyword("if") KWInit = NewKeyword("init") KWInvoke = NewKeyword("invoke") KWItems = NewKeyword("items") KWKeys = NewKeyword("keys") KWLet = NewKeyword("let") KWLoop = NewKeyword("loop") KWMOrF = NewKeyword("m-or-f") KWMap = NewKeyword("map") KWMaybeHostForm = NewKeyword("maybe-host-form") KWMeta = NewKeyword("meta") KWMethod = NewKeyword("method") KWNew = NewKeyword("new") KWNodes = NewKeyword("nodes") KWQuote = NewKeyword("quote") KWRecur = NewKeyword("recur") KWRet = NewKeyword("ret") KWSet = NewKeyword("set") KWStatements = NewKeyword("statements") KWTarget = NewKeyword("target") KWTest = NewKeyword("test") KWTests = NewKeyword("tests") KWTheVar = NewKeyword("the-var") KWThen = NewKeyword("then") KWThrow = NewKeyword("throw") KWTry = NewKeyword("try") KWVal = NewKeyword("val") KWVals = NewKeyword("vals") KWVar = NewKeyword("var") KWVector = NewKeyword("vector") KWRawForms = NewKeyword("raw-forms") KWChildren = NewKeyword("children") KWMacro = NewKeyword("macro") KWPrivate = NewKeyword("private") KWDynamic = NewKeyword("dynamic") KWRedef = NewKeyword("redef") KWDirectLinking = NewKeyword("direct-linking") KWInline = NewKeyword("inline") KWInlineArities = NewKeyword("inline-arities") KWNS = NewKeyword("ns") )
var ( LockingTransaction = &LockingTransactor{} ErrNoTransaction = errors.New("no transaction running") )
var ( Throwable = reflect.TypeOf((interface{})(nil)) // Exception types IllegalStateException = reflect.TypeOf(&IllegalStateError{}) // TODO: convert use of 'matcher' in core.glj to fit go's // regexps. This supresses errors but doesn't actually work. Matcher = reflect.TypeOf(®exp.Regexp{}) // TODO: rework use of PrintWriter in core.glj PrintWriter = reflect.TypeOf(&bytes.Buffer{}) )
var ( NSCore = FindOrCreateNamespace(SymbolCoreNamespace) VarNS = InternVar(NSCore, NewSymbol("ns"), false, true) VarInNS = InternVar(NSCore, NewSymbol("in-ns"), false, true) VarLoadFile = InternVar(NSCore, NewSymbol("load-file"), nil, true) VarCurrentNS = InternVarReplaceRoot(NSCore, NewSymbol("*ns*"), NSCore).SetDynamic() VarWarnOnReflection = InternVarReplaceRoot(NSCore, NewSymbol("*warn-on-reflection*"), false).SetDynamic() VarUncheckedMath = InternVarReplaceRoot(NSCore, NewSymbol("*unchecked-math*"), false).SetDynamic() VarAgent = InternVarReplaceRoot(NSCore, NewSymbol("*agent*"), nil).SetDynamic() VarPrintReadably = InternVarReplaceRoot(NSCore, NewSymbol("*print-readably*"), true).SetDynamic() VarOut = InternVarReplaceRoot(NSCore, NewSymbol("*out*"), os.Stdout).SetDynamic() VarIn = InternVarReplaceRoot(NSCore, NewSymbol("*in*"), os.Stdin).SetDynamic() VarAssert = InternVarReplaceRoot(NSCore, NewSymbol("*assert*"), false).SetDynamic() VarCompileFiles = InternVarReplaceRoot(NSCore, NewSymbol("*compile-files*"), false).SetDynamic() VarFile = InternVarReplaceRoot(NSCore, NewSymbol("*file*"), "NO_SOURCE_FILE").SetDynamic() VarDataReaders = InternVarReplaceRoot(NSCore, NewSymbol("*data-readers*"), emptyMap).SetDynamic() // TODO: use variant of InternVar that doesn't replace root. VarPrintInitialized = InternVarName(NSCore.Name(), NewSymbol("print-initialized")) VarPrOn = InternVarName(NSCore.Name(), NewSymbol("pr-on")) VarParents = InternVarName(NSCore.Name(), NewSymbol("parents")) )
var EmptyPersistentQueue = &PersistentQueue{}
var (
Numbers = &NumberMethods{}
)
var (
SymbolCoreNamespace = NewSymbol("clojure.core")
)
Functions ¶
func AllKeywords ¶ added in v0.6.5
func AllKeywords() []string
AllKeywords returns all keyword strings that have been interned.
func AppendWriter ¶
AppendWriter is a shim for clojure.core's use of Java's append() method, which is not available on go's io.Writer interface.
func Apply0 ¶ added in v0.6.5
func Apply0(fn interface{}) any
Apply0 dispatches a zero-argument call, using FnFunc0 fast path when available.
func Apply1 ¶ added in v0.6.5
Apply1 dispatches a one-argument call, using FnFunc1 fast path when available.
func Apply2 ¶ added in v0.6.5
Apply2 dispatches a two-argument call, using FnFunc2 fast path when available.
func Apply3 ¶ added in v0.6.5
Apply3 dispatches a three-argument call, using FnFunc3 fast path when available.
func Apply4 ¶ added in v0.6.5
Apply4 dispatches a four-argument call, using FnFunc4 fast path when available.
func Apply5 ¶ added in v0.7.1
Apply5 dispatches a five-argument call without constructing an argument slice when the target exposes a fixed five-argument method.
func ApplySeq ¶ added in v0.7.0
func ApplySeq(fn interface{}, args ISeq) interface{}
ApplySeq applies an argument sequence without first realizing it into a Go slice when the target implements IFn. This is the natural dispatch path for Clojure's apply and lets function implementations consume reducible or lazy argument sequences directly.
func AsInt ¶
AsInt returns any integral value as an int. If the value cannot be represented as an int, it returns false. Floats are not converted.
func AsNumber ¶
AsNumber returns any value as a number. If the value is not a number, it returns false.
func BigIntStringFromFloat64 ¶ added in v0.6.5
BigIntStringFromFloat64 converts a float64 to its decimal string representation with the fractional part truncated, suitable for parsing as a BigInt. This preserves the exact decimal digits rather than going through binary float representation.
func BooleanCast ¶
func BoundedLength ¶ added in v0.7.0
BoundedLength returns the number of elements in s, stopping at limit. A result equal to limit means the sequence has at least that many elements.
func BoxInt64 ¶ added in v0.7.0
BoxInt64 returns a shared interface value for common integers. Go otherwise allocates when an int64 escapes through an interface, which is frequent in the dynamic numeric path used by both interpreted and generated code.
func CachedCompileRegexp ¶ added in v0.6.5
CachedCompileRegexp compiles pattern on first call and returns the cached *regexp.Regexp on subsequent calls. This is a drop-in replacement for regexp.MustCompile when the same patterns are compiled repeatedly.
func CatchMatches ¶ added in v0.4.0
CatchMatches checks if a recovered panic value matches an expected catch type. This implements the semantics of Clojure's try/catch matching.
func CharLiteralFromRune ¶
CharLiteralFromRune returns a character literal from a rune.
func CheckedAddInt64 ¶ added in v0.7.0
CheckedAddInt64 implements Clojure's overflowing fixed-width integer add without converting through interface values.
func CheckedMultiplyInt64 ¶ added in v0.7.0
CheckedMultiplyInt64 implements Clojure's overflowing fixed-width integer multiplication without converting through interface values.
func CheckedNegateInt64 ¶ added in v0.7.0
CheckedNegateInt64 implements Clojure's overflowing fixed-width integer negation without converting through an interface value.
func CheckedSubInt64 ¶ added in v0.7.0
CheckedSubInt64 implements Clojure's overflowing fixed-width integer subtraction without converting through interface values.
func CloneThreadBindingFrame ¶
func CloneThreadBindingFrame() any
func Compare ¶ added in v0.2.7
Compare implements Clojure's compare function. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Handles nil values (nil is less than everything except nil).
func ConcatStrings ¶
func CreatePersistentHashMap ¶
func CreatePersistentTreeMap ¶
func CreatePersistentTreeMap(keyvals interface{}) interface{}
func CreatePersistentTreeMapWithComparator ¶ added in v0.6.5
func CreatePersistentTreeMapWithComparator(comparator IFn, keyvals interface{}) interface{}
func CreatePersistentTreeSet ¶
func FieldOrMethod ¶
FieldOrMethod returns the field or method of the given name on the given value or pointer to a value, and a boolean indicating whether the field or method was found. If the given value is a pointer, it is dereferenced. If the value or pointer target is not a struct, or if no such field or method exists, nil and false are returned. The first letter of the name will be capitalized if it is not already. This is because Go exports fields and methods that start with a capital letter.
Method results are cached and wrapped as FnFunc so that subsequent Apply calls use the IFn fast path instead of reflection.
func ForceDelay ¶ added in v0.6.0
func GetDefault ¶
func GetPersistentStructMapAccessor ¶ added in v0.4.0
func GetPersistentStructMapAccessor() any
func GoMapIndex ¶
func GoMapIndex(m, k interface{}) interface{}
func GoSetMapIndex ¶
func GoSetMapIndex(m, k, v interface{})
func IdentityHash ¶
func IdentityHash(x interface{}) uint32
func IncP ¶
IncP increments a number value by one. If incrementing would overflow, it promotes the value to a wider type, or BigInt. If the value is not a number, it returns an error.
func IsAutoRegisteredMethod ¶ added in v0.6.5
IsAutoRegisteredMethod reports whether (dispatchVal, method) is an entry seeded by registerWellKnownMethods for a MultiFn named mfName. AOT codegen uses this to skip re-emitting these entries: the compiled binary's lang.NewMultiFn call seeds them automatically, and the method values are opaque Go FnFuncs that codegen cannot serialize.
func IsInstance ¶ added in v0.7.2
IsInstance performs the same assignability check as HasType when the target type is known at compile time. AOT code can use a Go type assertion instead of reflect.Type.AssignableTo.
func IsReversible ¶ added in v0.6.5
func IsReversible(x interface{}) bool
func IsSeqTruthy ¶ added in v0.7.2
IsSeqTruthy reports whether seq would return a non-nil value, avoiding a sequence wrapper for collections whose emptiness is directly observable.
func LenientCompare ¶ added in v0.6.5
LenientCompare is like Compare but falls back to string comparison for incompatible types instead of panicking. Used internally by sorted collections that may contain mixed types.
func MustAsNumber ¶
func MustHostCast ¶ added in v0.7.2
MustHostCast performs the assignable interface conversion used by generated direct host calls. A nil value becomes the zero value so nilable host parameters retain the same behavior as reflective invocation.
func MustNth ¶
func MustNth(x interface{}, i int) interface{}
MustNth returns the nth element of the vector. It panics if the index is out of range.
func NewArithmeticError ¶
func NewCompilerError ¶ added in v0.4.0
func NewHostInstance ¶ added in v0.7.3
NewHostInstance constructs a registered JVM compatibility class, falling back to Go's zero-value allocation for ordinary reflect.Types.
func NewIllegalArgumentError ¶
func NewIllegalStateError ¶
func NewIndexOutOfBoundsError ¶
func NewIndexOutOfBoundsError() error
func NewTaggedLiteral ¶ added in v0.7.6
func NewTimeoutError ¶
NewTimeoutError creates a new timeout error.
func NewUnsupportedOperationError ¶ added in v0.4.0
func NumbersEqual ¶
func Peek ¶
func Peek(stk IPersistentStack) interface{}
func PopThreadBindings ¶
func PopThreadBindings()
func PrintString ¶
func PrintString(v interface{}) string
RTPrintString corresponds to Clojure's RT.printString.
func PushThreadBindings ¶
func PushThreadBindings(bindings IPersistentMap)
func RecordApplyTo ¶ added in v0.7.2
func RecordApplyTo(record RecordValue, args ISeq) any
func RecordContainsKey ¶ added in v0.7.2
func RecordContainsKey(record RecordValue, key any) bool
func RecordCount ¶ added in v0.7.2
func RecordCount(record RecordValue) int
func RecordEquiv ¶ added in v0.7.2
func RecordEquiv(record RecordValue, other any) bool
func RecordHash ¶ added in v0.7.2
func RecordHash(cache *uint32, record RecordValue) uint32
func RecordHashEq ¶ added in v0.7.2
func RecordHashEq(cache *uint32, record RecordValue) uint32
func RecordInvoke ¶ added in v0.7.2
func RecordInvoke(record RecordValue, args ...any) any
func RecordString ¶ added in v0.7.2
func RecordString(record RecordValue) string
func RecordValAt ¶ added in v0.7.2
func RecordValAt(record RecordValue, key any) any
func RecordValAtDefault ¶ added in v0.7.2
func RecordValAtDefault(record RecordValue, key, fallback any) any
func Reduce ¶
func Reduce(f func(interface{}, interface{}) interface{}, seq ISeq) interface{}
Reduce applies the given function to each element of the ISeq.
func ReduceInit ¶
func ReduceInit(f func(interface{}, interface{}) interface{}, init interface{}, seq ISeq) interface{}
func ReduceKV ¶
func ReduceKV(f func(init, k, v interface{}) interface{}, init, coll interface{}) interface{}
func ReflectType ¶ added in v0.7.5
ReflectType unwraps both native Go reflect.Type values and JVM-style Class wrappers to the host type used by the runtime.
func RegisterHostConstructor ¶ added in v0.7.3
RegisterHostConstructor installs the implementation used by `(Class. ...)` for a JVM compatibility class. Registrations happen during package init.
func RegisterHostTypeConstructor ¶ added in v0.7.6
RegisterHostTypeConstructor preserves constructor dispatch when analysis has reduced a compatibility Class wrapper to its primary reflect.Type.
func RegisterReadablePrinter ¶ added in v0.7.6
RegisterReadablePrinter installs a Clojure-readable print-method for a hosted type that cannot implement ReadablePrinter itself.
func RegisterStringMethod ¶ added in v0.6.5
func RegisterStringMethod(name string, fn StringMethod)
RegisterStringMethod registers fn as the implementation of the given JVM-style method name on java.lang.String (e.g. "length", "toUpperCase", "substring"). Called from package init in the javacompat layer; not safe for concurrent use after startup.
func RemoveNamespace ¶
func RemoveNamespace(sym *Symbol)
func ResetThreadBindingFrame ¶
func ResetThreadBindingFrame(frame any)
func ReverseString ¶ added in v0.7.2
ReverseString reverses Unicode code points. Glojure strings use byte collection semantics, while text operations such as clojure.string/reverse explicitly operate on characters.
func RuneFromCharLiteral ¶
RuneFromCharLiteral returns the rune value from a character literal.
func SeqToTypedArray ¶ added in v0.7.2
SeqToTypedArray implements Clojure's one- and two-argument clojure.lang.RT/seqToTypedArray overloads using Go slices.
func SetUnboundVarResolver ¶ added in v0.7.0
func SetUnboundVarResolver(resolver func(*Var))
SetUnboundVarResolver installs the runtime hook used to load an AOT namespace when one of its Vars is first dereferenced.
func ShutdownAgents ¶
func ShutdownAgents()
func SortSlice ¶ added in v0.2.7
SortSlice performs an in-place stable sort on the given array using the provided comparator. This matches java.util.Arrays.sort semantics: - Stable sort (equal elements maintain their relative order) - In-place modification of the array - Comparator returns -1 for less than, 0 for equal, 1 for greater than
func ToString ¶
func ToString(v interface{}) string
ToString converts a value to a string a la Java's .toString method.
func UncheckedByteCast ¶
func UncheckedFloatCast ¶
func UncheckedIntCast ¶
func UncheckedLongCast ¶
func UncheckedShortCast ¶
Types ¶
type AMapEntry ¶
type AMapEntry interface {
APersistentVector
IMapEntry
}
type APersistentMap ¶
type APersistentMap interface {
AFn
IPersistentMap
IHashEq
Hasher
}
type APersistentSet ¶
type APersistentSet interface {
AFn
IPersistentSet
IHashEq
Hasher
}
type APersistentVector ¶
type APersistentVector interface {
AFn
IPersistentVector
IHashEq
Reversible
Comparer
}
type ARef ¶ added in v0.6.0
type ARef interface {
IRef
AReference
}
type AReference ¶ added in v0.6.0
type AReference interface {
Meta() IPersistentMap
AlterMeta(f IFn, args ISeq) IPersistentMap
ResetMeta(meta IPersistentMap) IPersistentMap
}
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) RemoveWatch ¶ added in v0.6.0
func (a *Agent) RemoveWatch(key interface{})
func (*Agent) Watches ¶ added in v0.6.0
func (a *Agent) Watches() IPersistentMap
type ArithmeticError ¶
type ArithmeticError struct {
// contains filtered or unexported fields
}
func (*ArithmeticError) Error ¶
func (e *ArithmeticError) Error() string
func (*ArithmeticError) Is ¶
func (e *ArithmeticError) Is(other error) bool
type ArityFn ¶ added in v0.7.0
type ArityFn struct {
// contains filtered or unexported fields
}
ArityFn represents a function with multiple fixed arities and an optional variadic method. The fixed InvokeN methods keep common call sites off the variadic []any path while Invoke and ApplyTo preserve general IFn behavior.
func NewArityFn ¶ added in v0.7.0
func NewArityFnMethods ¶ added in v0.7.0
func (ArityFn) Meta ¶ added in v0.7.0
func (f ArityFn) Meta() IPersistentMap
func (ArityFn) WithMeta ¶ added in v0.7.0
func (f ArityFn) WithMeta(meta IPersistentMap) any
type ArrayList ¶ added in v0.4.0
type ArrayList struct {
// contains filtered or unexported fields
}
ArrayList is a minimal implementation of a subset of Java's ArrayList to replace uses of java.util.ArrayList in the Clojure standard library.
func NewArrayList ¶ added in v0.4.0
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 {
// contains filtered or unexported fields
}
func (*ArrayNodeSeq) Cons ¶
func (s *ArrayNodeSeq) Cons(obj any) Conser
func (*ArrayNodeSeq) Count ¶
func (s *ArrayNodeSeq) Count() int
func (*ArrayNodeSeq) Empty ¶
func (s *ArrayNodeSeq) Empty() IPersistentCollection
func (*ArrayNodeSeq) Equals ¶
func (s *ArrayNodeSeq) Equals(obj any) bool
func (*ArrayNodeSeq) Equiv ¶
func (s *ArrayNodeSeq) Equiv(obj any) bool
func (*ArrayNodeSeq) First ¶
func (s *ArrayNodeSeq) First() any
func (*ArrayNodeSeq) Hash ¶
func (s *ArrayNodeSeq) Hash() uint32
func (*ArrayNodeSeq) HashEq ¶
func (s *ArrayNodeSeq) HashEq() uint32
func (*ArrayNodeSeq) Meta ¶
func (s *ArrayNodeSeq) Meta() IPersistentMap
func (*ArrayNodeSeq) More ¶
func (s *ArrayNodeSeq) More() ISeq
func (*ArrayNodeSeq) Next ¶
func (s *ArrayNodeSeq) Next() ISeq
func (*ArrayNodeSeq) Seq ¶
func (s *ArrayNodeSeq) Seq() ISeq
func (*ArrayNodeSeq) String ¶
func (s *ArrayNodeSeq) String() string
func (*ArrayNodeSeq) WithMeta ¶
func (s *ArrayNodeSeq) WithMeta(meta IPersistentMap) any
type Associative ¶
type Associative interface {
IPersistentCollection
ILookup
ContainsKey(any) bool
EntryAt(any) IMapEntry
Assoc(k, v any) Associative
}
func Assoc ¶
func Assoc(a any, k, v any) Associative
func RecordAssoc ¶ added in v0.7.2
func RecordAssoc(record RecordValue, key, value any) Associative
type Atom ¶
type Atom struct {
// contains filtered or unexported fields
}
func NewAtomWithMeta ¶ added in v0.4.0
func NewAtomWithMeta(val any, meta IPersistentMap) *Atom
func (*Atom) CompareAndSet ¶
func (*Atom) GetValidator ¶ added in v0.7.2
GetValidator is the JVM-style IRef alias used by Clojure host interop.
func (*Atom) Meta ¶ added in v0.4.0
func (a *Atom) Meta() IPersistentMap
func (*Atom) RemoveWatch ¶
func (a *Atom) RemoveWatch(key interface{})
func (*Atom) ResetMeta ¶ added in v0.7.2
func (a *Atom) ResetMeta(meta IPersistentMap) IPersistentMap
func (*Atom) SetValidator ¶
func (*Atom) Swap0 ¶ added in v0.7.1
Swap0, Swap1, and Swap2 are fixed-arity counterparts to Swap. They avoid constructing an argument sequence when callers already know the number of additional arguments, while preserving Atom's compare-and-set retry loop.
func (*Atom) Watches ¶
func (a *Atom) Watches() IPersistentMap
type BigDecimal ¶
type BigDecimal struct {
// contains filtered or unexported fields
}
BigDec is an arbitrary-precision floating point number. It wraps and has the same semantics as big.Float. big.Float is not used directly because it is mutable, and the core BigDecimal should not be.
TODO: swap out with a *decimal* representation. The go standard library big.Float is a binary floating point representation, which means that some decimal fractions cannot be represented exactly. This can lead to unexpected results when doing arithmetic with decimal fractions. A decimal representation would avoid this problem.
func AsBigDecimal ¶
func AsBigDecimal(x any) *BigDecimal
func NewBigDecimal ¶
func NewBigDecimal(s string) (*BigDecimal, error)
NewBigDecimal creates a new BigDecimal from a string.
func NewBigDecimalFromBigFloat ¶
func NewBigDecimalFromBigFloat(x *big.Float) *BigDecimal
NewBigDecimalFromBigFloat
func NewBigDecimalFromBigInt ¶ added in v0.6.5
func NewBigDecimalFromBigInt(x *big.Int) *BigDecimal
func NewBigDecimalFromFloat64 ¶
func NewBigDecimalFromFloat64(x float64) *BigDecimal
NewBigDecimalFromFloat64 creates a new BigDecimal from a float64.
func NewBigDecimalFromInt64 ¶
func NewBigDecimalFromInt64(x int64) *BigDecimal
func NewBigDecimalFromRatio ¶ added in v0.4.0
func NewBigDecimalFromRatio(x *Ratio) *BigDecimal
func (*BigDecimal) Abs ¶
func (n *BigDecimal) Abs() *BigDecimal
func (*BigDecimal) Add ¶
func (n *BigDecimal) Add(other *BigDecimal) *BigDecimal
func (*BigDecimal) AddInt ¶
func (n *BigDecimal) AddInt(x int) *BigDecimal
func (*BigDecimal) AddP ¶
func (n *BigDecimal) AddP(other *BigDecimal) *BigDecimal
func (*BigDecimal) Cmp ¶
func (n *BigDecimal) Cmp(other *BigDecimal) int
func (*BigDecimal) Divide ¶
func (n *BigDecimal) Divide(other *BigDecimal) *BigDecimal
func (*BigDecimal) Equals ¶
func (n *BigDecimal) Equals(v interface{}) bool
func (*BigDecimal) GT ¶
func (n *BigDecimal) GT(other *BigDecimal) bool
func (*BigDecimal) GTE ¶
func (n *BigDecimal) GTE(other *BigDecimal) bool
func (*BigDecimal) Hash ¶
func (n *BigDecimal) Hash() uint32
func (*BigDecimal) LT ¶
func (n *BigDecimal) LT(other *BigDecimal) bool
func (*BigDecimal) LTE ¶
func (n *BigDecimal) LTE(other *BigDecimal) bool
func (*BigDecimal) Multiply ¶
func (n *BigDecimal) Multiply(other *BigDecimal) *BigDecimal
func (*BigDecimal) Negate ¶
func (n *BigDecimal) Negate() *BigDecimal
func (*BigDecimal) Quotient ¶
func (n *BigDecimal) Quotient(other *BigDecimal) *BigDecimal
func (*BigDecimal) Remainder ¶
func (n *BigDecimal) Remainder(other *BigDecimal) *BigDecimal
func (*BigDecimal) SetScale ¶ added in v0.7.6
func (n *BigDecimal) SetScale(scale any, mode any) *BigDecimal
SetScale implements the java.math.BigDecimal rounding modes used by portable Clojure libraries. DOWN truncates toward zero and HALF_EVEN uses banker's rounding.
func (*BigDecimal) String ¶
func (n *BigDecimal) String() string
func (*BigDecimal) StripTrailingZeros ¶ added in v0.6.5
func (n *BigDecimal) StripTrailingZeros() string
StripTrailingZeros returns a string representation with trailing fractional zeros removed (e.g. "1.0" → "1", "1.50" → "1.5").
func (*BigDecimal) Sub ¶
func (n *BigDecimal) Sub(other *BigDecimal) *BigDecimal
func (*BigDecimal) SubP ¶
func (n *BigDecimal) SubP(other *BigDecimal) *BigDecimal
func (*BigDecimal) ToBigFloat ¶ added in v0.4.0
func (n *BigDecimal) ToBigFloat() *big.Float
func (*BigDecimal) ToBigInteger ¶
func (n *BigDecimal) ToBigInteger() *big.Int
func (*BigDecimal) ToPlainString ¶ added in v0.7.6
func (n *BigDecimal) ToPlainString() string
type BigInt ¶
type BigInt struct {
// contains filtered or unexported fields
}
BigInt is an arbitrary-precision integer. It wraps and has the same semantics as big.Int. big.Int is not used directly because it is mutable, and the core BigInt should not be.
func NewBigIntFromGoBigInt ¶
func NewBigIntFromInt64 ¶
NewBigIntFromInt64 creates a new BigInt from an int64.
func NewBigIntWithBase ¶
NewBigIntWithBase creates a new BigInt from a string.
func (*BigInt) ResolveFieldOrMethod ¶ added in v0.7.6
func (*BigInt) ToBigDecimal ¶
func (n *BigInt) ToBigDecimal() *BigDecimal
func (*BigInt) ToBigInteger ¶
type BitmapIndexedNode ¶
type BitmapIndexedNode struct {
// contains filtered or unexported fields
}
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box is a wrapper around a value that can be used to store values of different types in atomic.Value, which requires all stored values to have the same concrete type.
type ChunkBuffer ¶
type ChunkBuffer struct {
// contains filtered or unexported fields
}
func NewChunkBuffer ¶
func NewChunkBuffer(capacity int) *ChunkBuffer
func (*ChunkBuffer) Add ¶
func (cb *ChunkBuffer) Add(item interface{})
func (*ChunkBuffer) Chunk ¶
func (cb *ChunkBuffer) Chunk() IChunk
func (*ChunkBuffer) Count ¶
func (cb *ChunkBuffer) Count() int
type ChunkedCons ¶
type ChunkedCons struct {
// contains filtered or unexported fields
}
func NewChunkedCons ¶
func NewChunkedCons(chunk IChunk, more ISeq) *ChunkedCons
func (*ChunkedCons) ChunkedFirst ¶
func (c *ChunkedCons) ChunkedFirst() IChunk
func (*ChunkedCons) ChunkedMore ¶
func (c *ChunkedCons) ChunkedMore() ISeq
func (*ChunkedCons) ChunkedNext ¶
func (c *ChunkedCons) ChunkedNext() ISeq
func (*ChunkedCons) Cons ¶
func (c *ChunkedCons) Cons(o any) Conser
func (*ChunkedCons) Count ¶
func (c *ChunkedCons) Count() int
func (*ChunkedCons) Empty ¶
func (c *ChunkedCons) Empty() IPersistentCollection
func (*ChunkedCons) Equals ¶
func (c *ChunkedCons) Equals(o any) bool
func (*ChunkedCons) Equiv ¶
func (c *ChunkedCons) Equiv(o any) bool
func (*ChunkedCons) First ¶
func (c *ChunkedCons) First() any
func (*ChunkedCons) Hash ¶
func (c *ChunkedCons) Hash() uint32
func (*ChunkedCons) HashEq ¶
func (c *ChunkedCons) HashEq() uint32
func (*ChunkedCons) Meta ¶
func (c *ChunkedCons) Meta() IPersistentMap
func (*ChunkedCons) More ¶
func (c *ChunkedCons) More() ISeq
func (*ChunkedCons) Next ¶
func (c *ChunkedCons) Next() ISeq
func (*ChunkedCons) Seq ¶
func (c *ChunkedCons) Seq() ISeq
func (*ChunkedCons) String ¶
func (c *ChunkedCons) String() string
func (*ChunkedCons) WithMeta ¶
func (c *ChunkedCons) WithMeta(meta IPersistentMap) any
type Class ¶ added in v0.6.5
Class is a JVM-style Class object for host classes registered through pkgmap (java.lang.Math, java.util.UUID, ...). It embeds the underlying reflect.Type so it still passes `(instance? Class x)` (which compiles to `HasType(reflect.Type, x)`); the embedded field promotes all reflect.Type methods. Name() and String() are overridden to return the fully-qualified Java name so `(ns-imports *ns*)` and other forms print as `java.lang.Math` rather than the underlying Go type name.
func NewClass ¶ added in v0.6.5
NewClass wraps t with the given fully-qualified Java name. The Java name is what shows up in print-method output and (.getName c).
func NewClassWithTypes ¶ added in v0.7.5
NewClassWithTypes creates a JVM-style class represented by one or more Go types. The first type remains the primary type used for host construction and static interop; the remaining types are accepted by dynamic instance?.
func (*Class) Name ¶ added in v0.6.5
Name shadows the embedded reflect.Type.Name() so `(.getName c)` (which rewrite-core turns into `.Name`) returns the JVM-canonical name.
type CompilerError ¶ added in v0.4.0
type CompilerError struct {
// contains filtered or unexported fields
}
func (*CompilerError) Error ¶ added in v0.4.0
func (e *CompilerError) Error() string
type Cons ¶
type Cons struct {
// contains filtered or unexported fields
}
func (*Cons) Empty ¶
func (c *Cons) Empty() IPersistentCollection
func (*Cons) Meta ¶
func (c *Cons) Meta() IPersistentMap
func (*Cons) WithMeta ¶
func (c *Cons) WithMeta(meta IPersistentMap) any
type Conser ¶
Conser is an interface for values that can be consed onto.
func RecordCons ¶ added in v0.7.2
func RecordCons(record RecordValue, value any) Conser
type Counted ¶
type Counted interface {
Counter
// contains filtered or unexported methods
}
Counted is an interface for compound values whose elements can be counted in constant time.
type Counter ¶ added in v0.6.0
type Counter interface {
Count() int
}
Counter is an interface for compound values whose elements can be counted. This interface does not appear in Clojure; in JVM Clojure, interfaces must be declared, so classes can implement count() without implementing Counted. Clojure leverages that to distinguish between collections that can be counted in constant time and those that can't. In Go, we don't have that distinction, so we use the Counter interface to represent any value that can be counted, and Counted to represent those that can be counted in constant time.
type Cycle ¶
type Cycle struct {
// contains filtered or unexported fields
}
func (*Cycle) Empty ¶
func (c *Cycle) Empty() IPersistentCollection
func (*Cycle) IsRealized ¶
func (*Cycle) Meta ¶
func (c *Cycle) Meta() IPersistentMap
func (*Cycle) ReduceInit ¶
func (*Cycle) WithMeta ¶
func (c *Cycle) WithMeta(meta IPersistentMap) interface{}
type Delay ¶ added in v0.6.0
type Delay struct {
// contains filtered or unexported fields
}
func (*Delay) IsRealized ¶ added in v0.6.0
type EmptyList ¶
type EmptyList struct {
// contains filtered or unexported fields
}
func (*EmptyList) Empty ¶
func (e *EmptyList) Empty() IPersistentCollection
func (*EmptyList) Meta ¶
func (e *EmptyList) Meta() IPersistentMap
func (*EmptyList) Pop ¶
func (e *EmptyList) Pop() IPersistentStack
func (*EmptyList) WithMeta ¶
func (e *EmptyList) WithMeta(meta IPersistentMap) any
type EmptyMapIterator ¶
type EmptyMapIterator struct {
}
type Environment ¶
type Environment interface {
// PushScope returns a new Environment with a scope nested inside
// this environment's scope.
//
// TODO: make this work properly for lexical scoping.
PushScope() Environment
// WithRecurTarget returns a new Environment with the given recur
// target. A recur form will return a RecurError with the given
// target.
WithRecurTarget(target interface{}) Environment
// BindLocal binds the given name to the given value in the local
// scope.
BindLocal(sym *Symbol, v interface{})
// DefVar defines a new var in the current namespace.
DefVar(sym *Symbol, v interface{}) *Var
// Eval evaluates a value representing an expression in this
// environment.
Eval(expr interface{}) (interface{}, error)
EvalAST(n interface{}) (interface{}, error)
// ResolveFile looks up a file in the environment. It should expand
// relative paths to absolute paths. Relative paths are searched for
// in the environments load paths.
//
// Deprecated
ResolveFile(path string) (string, bool)
// PushLoadPaths adds paths to the environment's list of load
// paths. The provided paths will be searched for relative paths
// first in the returned environment.
//
// Deprecated
PushLoadPaths(paths []string) Environment
SetCurrentNamespace(ns *Namespace)
CurrentNamespace() *Namespace
// Stdout returns the standard output stream for this environment.
Stdout() io.Writer
// Stderr returns the error output stream for this environment.
Stderr() io.Writer
// Context returns the context associated with this environment.
Context() context.Context
Errorf(form interface{}, format string, args ...interface{}) error
// LookupLocal looks up a local binding in the environment.
// This is used by the codegen system to access captured values.
LookupLocal(name string) (any, bool)
}
Environment is an interface for execution environments.
var (
GlobalEnv Environment
)
type EvalError ¶ added in v0.4.0
type EvalError struct {
// contains filtered or unexported fields
}
EvalError is a value that represents an evaluation error.
func NewEvalError ¶ added in v0.4.0
func NewEvalError(frame StackFrame, err error) *EvalError
NewEvalError creates a new error value.
func (*EvalError) AddStack ¶ added in v0.4.0
func (e *EvalError) AddStack(frame StackFrame) error
AddStack adds a new stack trace entry.
func (*EvalError) Stack ¶ added in v0.4.0
func (e *EvalError) Stack() []StackFrame
Stack returns the stack trace.
type ExceptionInfo ¶ added in v0.6.0
type ExceptionInfo struct {
// contains filtered or unexported fields
}
func NewExceptionInfo ¶ added in v0.6.0
func NewExceptionInfo(msg string, data IPersistentMap) *ExceptionInfo
func NewExceptionInfoWithCause ¶ added in v0.6.0
func NewExceptionInfoWithCause(msg string, data IPersistentMap, cause error) *ExceptionInfo
func (*ExceptionInfo) Cause ¶ added in v0.6.0
func (e *ExceptionInfo) Cause() error
func (*ExceptionInfo) Error ¶ added in v0.6.0
func (e *ExceptionInfo) Error() string
func (*ExceptionInfo) GetData ¶ added in v0.6.0
func (e *ExceptionInfo) GetData() IPersistentMap
func (*ExceptionInfo) Is ¶ added in v0.6.0
func (e *ExceptionInfo) Is(target error) bool
func (*ExceptionInfo) Message ¶ added in v0.6.0
func (e *ExceptionInfo) Message() string
func (*ExceptionInfo) Unwrap ¶ added in v0.6.0
func (e *ExceptionInfo) Unwrap() error
type FieldOrMethodResolver ¶ added in v0.7.0
FieldOrMethodResolver lets packages built on lang provide direct method dispatch for runtime-owned values without manufacturing bound methods through reflect.
type FixedArityFn0 ¶ added in v0.7.0
type FixedArityFn0 interface{ Invoke0() any }
FixedArityFnN are optional fast-call interfaces. IFn implementations can provide them to avoid constructing a variadic argument slice at hot call sites while retaining Invoke for general application.
type FixedArityFn1 ¶ added in v0.7.0
type FixedArityFn2 ¶ added in v0.7.0
type FixedArityFn4 ¶ added in v0.7.0
type FixedArityFn5 ¶ added in v0.7.1
type FixedArityFn6 ¶ added in v0.7.2
type FixedArityFn7 ¶ added in v0.7.2
type FixedArityFn8 ¶ added in v0.7.2
type FixedArityFn9 ¶ added in v0.7.2
type FixedArityFn10 ¶ added in v0.7.2
type FixedArityFn11 ¶ added in v0.7.2
type FixedArityFn12 ¶ added in v0.7.2
type FixedArityFn13 ¶ added in v0.7.2
type FixedArityFn14 ¶ added in v0.7.2
type FixedArityFn15 ¶ added in v0.7.2
type FixedArityFn16 ¶ added in v0.7.2
type FixedArityFn17 ¶ added in v0.7.2
type FixedArityFn18 ¶ added in v0.7.2
type FixedArityFn19 ¶ added in v0.7.2
type FixedArityFn20 ¶ added in v0.7.2
type FnFunc ¶ added in v0.4.0
FnFunc is a wrapped Go function that implements the IFn interface.
func (FnFunc) Meta ¶ added in v0.4.0
func (f FnFunc) Meta() IPersistentMap
func (FnFunc) WithMeta ¶ added in v0.4.0
func (f FnFunc) WithMeta(meta IPersistentMap) any
type FnFunc0 ¶ added in v0.6.5
type FnFunc0 func() any
FnFunc0 is a zero-argument function implementing IFn with no []any allocation.
func NewFnFunc0 ¶ added in v0.6.5
func (FnFunc0) Meta ¶ added in v0.6.5
func (f FnFunc0) Meta() IPersistentMap
func (FnFunc0) WithMeta ¶ added in v0.6.5
func (f FnFunc0) WithMeta(_ IPersistentMap) any
type FnFunc1 ¶ added in v0.6.5
FnFunc1 is a one-argument function implementing IFn with no []any allocation.
func NewFnFunc1 ¶ added in v0.6.5
func (FnFunc1) Meta ¶ added in v0.6.5
func (f FnFunc1) Meta() IPersistentMap
func (FnFunc1) WithMeta ¶ added in v0.6.5
func (f FnFunc1) WithMeta(_ IPersistentMap) any
type FnFunc2 ¶ added in v0.6.5
FnFunc2 is a two-argument function implementing IFn with no []any allocation.
func (FnFunc2) Meta ¶ added in v0.6.5
func (f FnFunc2) Meta() IPersistentMap
func (FnFunc2) WithMeta ¶ added in v0.6.5
func (f FnFunc2) WithMeta(_ IPersistentMap) any
type FnFunc3 ¶ added in v0.6.5
FnFunc3 is a three-argument function implementing IFn with no []any allocation.
func (FnFunc3) Meta ¶ added in v0.6.5
func (f FnFunc3) Meta() IPersistentMap
func (FnFunc3) WithMeta ¶ added in v0.6.5
func (f FnFunc3) WithMeta(_ IPersistentMap) any
type FnFunc4 ¶ added in v0.6.5
FnFunc4 is a four-argument function implementing IFn with no []any allocation.
func (FnFunc4) Meta ¶ added in v0.6.5
func (f FnFunc4) Meta() IPersistentMap
func (FnFunc4) WithMeta ¶ added in v0.6.5
func (f FnFunc4) WithMeta(_ IPersistentMap) any
type FnFunc5 ¶ added in v0.7.1
FnFunc5 is a five-argument function implementing IFn with no []any allocation.
func (FnFunc5) Meta ¶ added in v0.7.1
func (f FnFunc5) Meta() IPersistentMap
func (FnFunc5) WithMeta ¶ added in v0.7.1
func (f FnFunc5) WithMeta(_ IPersistentMap) any
type FnFunc6 ¶ added in v0.7.2
func NewFnFunc6 ¶ added in v0.7.2
func (FnFunc6) Meta ¶ added in v0.7.2
func (f FnFunc6) Meta() IPersistentMap
func (FnFunc6) WithMeta ¶ added in v0.7.2
func (f FnFunc6) WithMeta(_ IPersistentMap) any
type FnFunc7 ¶ added in v0.7.2
func NewFnFunc7 ¶ added in v0.7.2
func (FnFunc7) Meta ¶ added in v0.7.2
func (f FnFunc7) Meta() IPersistentMap
func (FnFunc7) WithMeta ¶ added in v0.7.2
func (f FnFunc7) WithMeta(_ IPersistentMap) any
type FnFunc8 ¶ added in v0.7.2
func NewFnFunc8 ¶ added in v0.7.2
func (FnFunc8) Meta ¶ added in v0.7.2
func (f FnFunc8) Meta() IPersistentMap
func (FnFunc8) WithMeta ¶ added in v0.7.2
func (f FnFunc8) WithMeta(_ IPersistentMap) any
type FnFunc9 ¶ added in v0.7.2
func NewFnFunc9 ¶ added in v0.7.2
func (FnFunc9) Meta ¶ added in v0.7.2
func (f FnFunc9) Meta() IPersistentMap
func (FnFunc9) WithMeta ¶ added in v0.7.2
func (f FnFunc9) WithMeta(_ IPersistentMap) any
type FnFunc10 ¶ added in v0.7.2
func NewFnFunc10 ¶ added in v0.7.2
func (FnFunc10) Meta ¶ added in v0.7.2
func (f FnFunc10) Meta() IPersistentMap
func (FnFunc10) WithMeta ¶ added in v0.7.2
func (f FnFunc10) WithMeta(_ IPersistentMap) any
type FnFunc11 ¶ added in v0.7.2
func NewFnFunc11 ¶ added in v0.7.2
func (FnFunc11) Meta ¶ added in v0.7.2
func (f FnFunc11) Meta() IPersistentMap
func (FnFunc11) WithMeta ¶ added in v0.7.2
func (f FnFunc11) WithMeta(_ IPersistentMap) any
type FnFunc12 ¶ added in v0.7.2
func NewFnFunc12 ¶ added in v0.7.2
func (FnFunc12) Meta ¶ added in v0.7.2
func (f FnFunc12) Meta() IPersistentMap
func (FnFunc12) WithMeta ¶ added in v0.7.2
func (f FnFunc12) WithMeta(_ IPersistentMap) any
type FnFunc13 ¶ added in v0.7.2
func NewFnFunc13 ¶ added in v0.7.2
func (FnFunc13) Meta ¶ added in v0.7.2
func (f FnFunc13) Meta() IPersistentMap
func (FnFunc13) WithMeta ¶ added in v0.7.2
func (f FnFunc13) WithMeta(_ IPersistentMap) any
type FnFunc14 ¶ added in v0.7.2
func NewFnFunc14 ¶ added in v0.7.2
func (FnFunc14) Meta ¶ added in v0.7.2
func (f FnFunc14) Meta() IPersistentMap
func (FnFunc14) WithMeta ¶ added in v0.7.2
func (f FnFunc14) WithMeta(_ IPersistentMap) any
type FnFunc15 ¶ added in v0.7.2
func NewFnFunc15 ¶ added in v0.7.2
func (FnFunc15) Meta ¶ added in v0.7.2
func (f FnFunc15) Meta() IPersistentMap
func (FnFunc15) WithMeta ¶ added in v0.7.2
func (f FnFunc15) WithMeta(_ IPersistentMap) any
type FnFunc16 ¶ added in v0.7.2
type FnFunc16 func(any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any) any
func NewFnFunc16 ¶ added in v0.7.2
func (FnFunc16) Meta ¶ added in v0.7.2
func (f FnFunc16) Meta() IPersistentMap
func (FnFunc16) WithMeta ¶ added in v0.7.2
func (f FnFunc16) WithMeta(_ IPersistentMap) any
type FnFunc17 ¶ added in v0.7.2
type FnFunc17 func(any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any) any
func NewFnFunc17 ¶ added in v0.7.2
func (FnFunc17) Meta ¶ added in v0.7.2
func (f FnFunc17) Meta() IPersistentMap
func (FnFunc17) WithMeta ¶ added in v0.7.2
func (f FnFunc17) WithMeta(_ IPersistentMap) any
type FnFunc18 ¶ added in v0.7.2
type FnFunc18 func(any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any) any
func NewFnFunc18 ¶ added in v0.7.2
func (FnFunc18) Meta ¶ added in v0.7.2
func (f FnFunc18) Meta() IPersistentMap
func (FnFunc18) WithMeta ¶ added in v0.7.2
func (f FnFunc18) WithMeta(_ IPersistentMap) any
type FnFunc19 ¶ added in v0.7.2
type FnFunc19 func(any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any) any
func NewFnFunc19 ¶ added in v0.7.2
func (FnFunc19) Meta ¶ added in v0.7.2
func (f FnFunc19) Meta() IPersistentMap
func (FnFunc19) WithMeta ¶ added in v0.7.2
func (f FnFunc19) WithMeta(_ IPersistentMap) any
type FnFunc20 ¶ added in v0.7.2
type FnFunc20 func(any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any) any
func NewFnFunc20 ¶ added in v0.7.2
func (FnFunc20) Meta ¶ added in v0.7.2
func (f FnFunc20) Meta() IPersistentMap
func (FnFunc20) WithMeta ¶ added in v0.7.2
func (f FnFunc20) WithMeta(_ IPersistentMap) any
type FnValue ¶ added in v0.7.2
type FnValue interface {
IsFnValue()
}
FnValue marks values created to represent Clojure functions. It is narrower than IFn: keywords and collections can be invoked, but are not functions.
type GoMapSeq ¶
type GoMapSeq struct {
// contains filtered or unexported fields
}
func NewGoMapSeq ¶
func (*GoMapSeq) Empty ¶
func (s *GoMapSeq) Empty() IPersistentCollection
func (*GoMapSeq) Meta ¶
func (s *GoMapSeq) Meta() IPersistentMap
func (*GoMapSeq) WithMeta ¶
func (s *GoMapSeq) WithMeta(meta IPersistentMap) any
type HashCollisionNode ¶
type HashCollisionNode struct {
// contains filtered or unexported fields
}
type Hasher ¶
type Hasher interface {
Hash() uint32
}
Hasher is an interface for types that can be hashed. It's not in Clojure, but it's useful for Go where values don't come with a default hash method.
type IBlockingDeref ¶
func AgentSubmit ¶
func AgentSubmit(fn IFn) IBlockingDeref
type IChunkedSeq ¶
type IChunkedSeq interface {
ISeq
Sequential
ChunkedFirst() IChunk
ChunkedNext() ISeq
ChunkedMore() ISeq
}
type IDrop ¶
type IDrop interface {
Drop(n int) Sequential
}
type IEditableCollection ¶
type IEditableCollection interface {
AsTransient() ITransientCollection
}
type IExceptionInfo ¶ added in v0.6.0
type IExceptionInfo interface {
error
GetData() IPersistentMap
}
IExceptionInfo is an interface for exceptions that carry data (a map) as additional payload. Clojure programs that need richer semantics for exceptions should use this in lieu of defining project-specific error types..
type IMapEntry ¶
func RecordEntryAt ¶ added in v0.7.2
func RecordEntryAt(record RecordValue, key any) IMapEntry
type IMeta ¶
type IMeta interface {
// Meta returns the metadata associated with this value.
Meta() IPersistentMap
}
IMeta is an interface for values that can have metadata.
type IObj ¶
type IObj interface {
IMeta
// WithMeta returns a new value with the given metadata.
WithMeta(meta IPersistentMap) any
}
type IPersistentCollection ¶
type IPersistentCollection interface {
Seqable
Counter
Conser
Empty() IPersistentCollection
Equiv(any) bool
}
func RecordEmpty ¶ added in v0.7.2
func RecordEmpty(record RecordValue) IPersistentCollection
type IPersistentList ¶
type IPersistentList interface {
Sequential
IPersistentCollection
IPersistentStack
// Clojure's IPersistentList does not implement this, but it
// likely should.
ISeq
}
func NewList ¶
func NewList(values ...any) IPersistentList
type IPersistentMap ¶
type IPersistentMap interface {
//Iterable do we need this?
Associative
Counted
// AssocEx is like Assoc, but returns an error if the key already
// exists.
AssocEx(key, val any) IPersistentMap
// Without returns a new map with the given key removed.
Without(key any) IPersistentMap
}
func GetExData ¶ added in v0.6.0
func GetExData(err error) IPersistentMap
func GetThreadBindings ¶ added in v0.6.0
func GetThreadBindings() IPersistentMap
func Merge ¶
func Merge(m1, m2 IPersistentMap) IPersistentMap
func NewMap ¶
func NewMap(keyVals ...any) IPersistentMap
func NewMapUniqueKeys ¶ added in v0.7.2
func NewMapUniqueKeys(keyVals ...any) IPersistentMap
NewMapUniqueKeys constructs a map from compiler-owned key/value storage. Like Clojure's RT.mapUniqueKeys, it may retain the variadic backing array when the entries form a non-small persistent array map. Callers passing a slice with ... must not mutate that slice afterward.
func NewPersistentArrayMapAsIfByAssoc ¶
func NewPersistentArrayMapAsIfByAssoc(init []any) IPersistentMap
func NewPersistentHashMap ¶
func NewPersistentHashMap(keyvals ...any) IPersistentMap
func NewStaticKeywordMap ¶ added in v0.7.2
func NewStaticKeywordMap(shape *KeywordMapShape, values ...any) IPersistentMap
NewStaticKeywordMap constructs a persistent map whose immutable keyword layout is shared with other maps from the same AOT literal.
func RecordAssocEx ¶ added in v0.7.2
func RecordAssocEx(record RecordValue, key, value any) IPersistentMap
func RecordPersistentMap ¶ added in v0.7.2
func RecordPersistentMap(record RecordValue) IPersistentMap
func RecordWithout ¶ added in v0.7.2
func RecordWithout(record RecordValue, key any) IPersistentMap
func SafeMerge ¶
func SafeMerge(m1, m2 IPersistentMap) IPersistentMap
type IPersistentSet ¶
type IPersistentSet interface {
IPersistentCollection
Counted
Disjoin(any) IPersistentSet
Contains(any) bool
Get(any) any
}
type IPersistentStack ¶
type IPersistentStack interface {
Peek() any
Pop() IPersistentStack
}
func Pop ¶
func Pop(stk IPersistentStack) IPersistentStack
type IPersistentVector ¶
type IPersistentVector interface {
Associative
Sequential
IPersistentStack
Reversible
Indexed
Counted // Note: not in Clojure's vector interface, oddly
Length() int
AssocN(int, any) IPersistentVector
Cons(any) Conser
}
IPersistentVector is a persistent vector.
func CreateLazilyPersistentVector ¶
func CreateLazilyPersistentVector(obj any) IPersistentVector
func CreateOwningLazilyPersistentVector ¶
func CreateOwningLazilyPersistentVector(items any) IPersistentVector
CreateOwningLazilyPersistentVector creates a persistent vector that owns the items in items. items must be a slice or array.
func Subvec ¶
func Subvec(v IPersistentVector, start, end int) IPersistentVector
type IRecord ¶
type IRecord interface {
IPersistentMap
// contains filtered or unexported methods
}
type IReduceInit ¶
type ISeq ¶
type ISeq interface {
IPersistentCollection
Conser
// First returns the first element of the sequence.
First() any
// Next returns the rest of the sequence, or nil if there are no
// more.
Next() ISeq
// More returns true if there are more elements in the sequence.
More() ISeq
}
func AllNamespaces ¶ added in v0.5.1
func AllNamespaces() ISeq
func NewLazySeq ¶
func NewLazySeq(fn func() interface{}) ISeq
func NewLongRange ¶
NewLongRange returns a lazy sequence of start, start + step, start + 2*step, ...
func NewMapKeySeq ¶
func NewMapValSeq ¶
func NewMappedSeq ¶ added in v0.7.1
func NewRepeatN ¶
func NewSliceSeq ¶
func RecordSeq ¶ added in v0.7.2
func RecordSeq(record RecordValue) ISeq
type ITransientAssociative ¶
type ITransientAssociative interface {
ITransientCollection
ILookup
Assoc(any, any) ITransientAssociative
}
type ITransientCollection ¶
type ITransientCollection interface {
Conjer
Persistent() IPersistentCollection
}
type ITransientMap ¶ added in v0.6.0
type ITransientMap interface {
ITransientAssociative
Counted
}
type ITransientSet ¶
type ITransientSet interface {
IPersistentCollection
Counted
Disjoin(any) ITransientSet
Contains(any) bool
Get(any) any
}
type ITransientVector ¶
type ITransientVector interface {
ITransientAssociative
Indexed
AssocN(int, any) ITransientVector
Pop() ITransientVector
}
type IllegalArgumentError ¶
type IllegalArgumentError struct {
// contains filtered or unexported fields
}
func (*IllegalArgumentError) Error ¶
func (e *IllegalArgumentError) Error() string
func (*IllegalArgumentError) Is ¶
func (e *IllegalArgumentError) Is(other error) bool
type IllegalStateError ¶
type IllegalStateError struct {
// contains filtered or unexported fields
}
func (*IllegalStateError) Error ¶
func (e *IllegalStateError) Error() string
func (*IllegalStateError) Is ¶
func (e *IllegalStateError) Is(other error) bool
type IndexOutOfBoundsError ¶
type IndexOutOfBoundsError struct{}
func (*IndexOutOfBoundsError) Error ¶
func (e *IndexOutOfBoundsError) Error() string
func (*IndexOutOfBoundsError) Is ¶
func (e *IndexOutOfBoundsError) Is(other error) bool
type IndexedSeq ¶
type IndexedSeq interface {
ISeq
Sequential
Counted
Index() int
}
type Int64Reducer ¶ added in v0.7.0
Int64Reducer is an optional unboxed reduction fast path for reducers whose semantics guarantee an int64 result for two int64 inputs.
type Int64ReductionStepper ¶ added in v0.7.0
type Int64ReductionStepper interface {
ReduceInt64Step(acc, value int64) (result int64, reduced bool)
}
Int64ReductionStepper is an optional unboxed reduction path that can terminate early without manufacturing a boxed Reduced value.
type Int64StepReducible ¶ added in v0.7.0
type Int64StepReducible interface {
ReduceInt64Steps(reducer Int64ReductionStepper, initial int64) int64
}
Int64StepReducible is an optional unboxed reduction path for sources that can stop when an Int64ReductionStepper signals completion.
type Iterate ¶ added in v0.5.1
type Iterate struct {
// contains filtered or unexported fields
}
func CreateIterate ¶ added in v0.5.1
func (*Iterate) Empty ¶ added in v0.5.1
func (it *Iterate) Empty() IPersistentCollection
func (*Iterate) IsRealized ¶ added in v0.5.1
func (*Iterate) Meta ¶ added in v0.5.1
func (it *Iterate) Meta() IPersistentMap
func (*Iterate) WithMeta ¶ added in v0.5.1
func (it *Iterate) WithMeta(meta IPersistentMap) any
type Iterator ¶ added in v0.4.0
Iterator is a Java-like iterator interface; included to more easly translate Clojure Java-isms.
type Keyword ¶
type Keyword struct {
// contains filtered or unexported fields
}
Keyword represents a keyword. Syntactically, a keyword is a symbol that starts with a colon and evaluates to itself.
func InternKeyword ¶
func InternKeyword(ns, name interface{}) Keyword
func InternKeywordString ¶
func InternKeywordSymbol ¶
func NewKeyword ¶
type KeywordMapShape ¶ added in v0.7.2
type KeywordMapShape struct {
// contains filtered or unexported fields
}
KeywordMapShape is an immutable key layout shared by maps emitted from the same AOT keyword-map literal. Shaped maps store only their values.
func NewKeywordMapShape ¶ added in v0.7.2
func NewKeywordMapShape(names ...string) *KeywordMapShape
type LazySeq ¶
type LazySeq struct {
// contains filtered or unexported fields
}
func (*LazySeq) Empty ¶
func (s *LazySeq) Empty() IPersistentCollection
func (*LazySeq) IsRealized ¶
func (*LazySeq) Meta ¶
func (s *LazySeq) Meta() IPersistentMap
func (*LazySeq) ReduceInit ¶ added in v0.7.0
func (*LazySeq) WithMeta ¶
func (s *LazySeq) WithMeta(meta IPersistentMap) interface{}
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a list of values.
func (*List) Empty ¶
func (l *List) Empty() IPersistentCollection
func (*List) Meta ¶
func (l *List) Meta() IPersistentMap
func (*List) Next ¶
Next returns the next list node. AKA cdr, with the requirement that it must be a list.
func (*List) Pop ¶
func (l *List) Pop() IPersistentStack
func (*List) WithMeta ¶
func (l *List) WithMeta(meta IPersistentMap) any
type LockingTransactor ¶
type LockingTransactor struct {
// contains filtered or unexported fields
}
func (*LockingTransactor) RunInTransaction ¶
func (lt *LockingTransactor) RunInTransaction(fn IFn) interface{}
type LongChunk ¶
type LongChunk struct {
// contains filtered or unexported fields
}
func NewLongChunk ¶
type LongRange ¶
type LongRange struct {
// contains filtered or unexported fields
}
func (*LongRange) ChunkedFirst ¶
func (*LongRange) ChunkedMore ¶
func (*LongRange) ChunkedNext ¶
func (*LongRange) Drop ¶
func (r *LongRange) Drop(n int) Sequential
func (*LongRange) Empty ¶
func (r *LongRange) Empty() IPersistentCollection
func (*LongRange) Meta ¶
func (r *LongRange) Meta() IPersistentMap
func (*LongRange) ReduceInt64Steps ¶ added in v0.7.0
func (r *LongRange) ReduceInt64Steps( reducer Int64ReductionStepper, initial int64, ) int64
func (*LongRange) WithMeta ¶
func (r *LongRange) WithMeta(meta IPersistentMap) any
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map represents a map of glojure values.
func InitStaticKeywordMap ¶ added in v0.7.2
func InitStaticKeywordMap(m *Map, shape *KeywordMapShape, values []any) *Map
InitStaticKeywordMap initializes compiler-owned map storage. The values slice must remain immutable and reachable for the lifetime of m.
func (*Map) AsTransient ¶
func (m *Map) AsTransient() ITransientCollection
func (*Map) Assoc ¶
func (m *Map) Assoc(k, v any) Associative
func (*Map) AssocEx ¶
func (m *Map) AssocEx(k, v any) IPersistentMap
func (*Map) ContainsKey ¶
func (*Map) Empty ¶
func (m *Map) Empty() IPersistentCollection
func (*Map) Meta ¶
func (m *Map) Meta() IPersistentMap
func (*Map) ValAtDefault ¶
func (*Map) WithMeta ¶
func (m *Map) WithMeta(meta IPersistentMap) any
func (*Map) Without ¶
func (m *Map) Without(k any) IPersistentMap
type MapEntry ¶
type MapEntry struct {
// contains filtered or unexported fields
}
MapEntry represents a key-value pair in a map.
func NewMapEntry ¶
func (*MapEntry) Assoc ¶
func (me *MapEntry) Assoc(k, v any) Associative
func (*MapEntry) ContainsKey ¶
func (*MapEntry) Empty ¶
func (me *MapEntry) Empty() IPersistentCollection
func (*MapEntry) Pop ¶
func (me *MapEntry) Pop() IPersistentStack
func (*MapEntry) ValAtDefault ¶
type MapIterator ¶
type MapKeySeq ¶
type MapKeySeq struct {
// contains filtered or unexported fields
}
func (*MapKeySeq) Empty ¶
func (s *MapKeySeq) Empty() IPersistentCollection
func (*MapKeySeq) Meta ¶
func (s *MapKeySeq) Meta() IPersistentMap
func (*MapKeySeq) WithMeta ¶
func (s *MapKeySeq) WithMeta(meta IPersistentMap) any
type MapSeq ¶
type MapSeq struct {
// contains filtered or unexported fields
}
func NewKeywordMapSeq ¶ added in v0.7.2
func NewKeywordMapSeq(shape *KeywordMapShape, values []any) *MapSeq
NewKeywordMapSeq constructs a sequence over an immutable shaped-map value slice. Map.Seq uses newKeywordMapSeq so delta overlays remain visible.
func (*MapSeq) Drop ¶
func (s *MapSeq) Drop(n int) Sequential
func (*MapSeq) Empty ¶
func (s *MapSeq) Empty() IPersistentCollection
func (*MapSeq) Meta ¶
func (s *MapSeq) Meta() IPersistentMap
func (*MapSeq) WithMeta ¶
func (s *MapSeq) WithMeta(meta IPersistentMap) any
type MapValSeq ¶
type MapValSeq struct {
// contains filtered or unexported fields
}
func (*MapValSeq) Empty ¶
func (s *MapValSeq) Empty() IPersistentCollection
func (*MapValSeq) Meta ¶
func (s *MapValSeq) Meta() IPersistentMap
func (*MapValSeq) WithMeta ¶
func (s *MapValSeq) WithMeta(meta IPersistentMap) any
type MultiFn ¶
type MultiFn struct {
// contains filtered or unexported fields
}
func NewMultiFn ¶
func (*MultiFn) GetDefaultDispatchVal ¶ added in v0.4.0
func (*MultiFn) GetDispatchFn ¶ added in v0.4.0
func (*MultiFn) GetHierarchy ¶ added in v0.4.0
func (*MultiFn) GetMethodTable ¶ added in v0.4.0
func (m *MultiFn) GetMethodTable() IPersistentMap
func (*MultiFn) PreferMethod ¶
func (*MultiFn) PreferTable ¶
func (m *MultiFn) PreferTable() IPersistentMap
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func FindNamespace ¶
func FindOrCreateNamespace ¶
func NamespaceFor ¶
func NewNamespace ¶
func (*Namespace) Aliases ¶
func (ns *Namespace) Aliases() IPersistentMap
func (*Namespace) FindInternedVar ¶
func (*Namespace) GetAliases ¶ added in v0.7.6
func (ns *Namespace) GetAliases() IPersistentMap
func (*Namespace) GetMapping ¶
func (*Namespace) InternWithValue ¶
func (*Namespace) LookupAlias ¶
func (*Namespace) Mappings ¶
func (ns *Namespace) Mappings() IPersistentMap
func (*Namespace) Meta ¶
func (ns *Namespace) Meta() IPersistentMap
func (*Namespace) Refer ¶
Refer adds a reference to an existing Var, possibly in another namespace, to this namespace.
func (*Namespace) ReferAll ¶ added in v0.7.0
func (ns *Namespace) ReferAll(src *Namespace, refs []NamespaceReference)
ReferAll adds a batch of references from src. Source mappings are collected under one read lock before the target namespace is changed.
func (*Namespace) ReferAllSnapshot ¶ added in v0.7.0
ReferAllSnapshot installs a shared, immutable view of src's interned Vars, excluding the supplied unqualified names. Generated AOT namespaces use this for broad refers such as clojure.core: lookups remain lazy, while a later mutation of src uses copy-on-write and cannot change the captured view.
func (*Namespace) ResetMeta ¶
func (ns *Namespace) ResetMeta(meta IPersistentMap) IPersistentMap
type NamespaceReference ¶ added in v0.7.0
NamespaceReference describes a Var imported from another namespace.
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 {
// contains filtered or unexported fields
}
func (*NodeSeq) Empty ¶
func (s *NodeSeq) Empty() IPersistentCollection
func (*NodeSeq) Meta ¶
func (n *NodeSeq) Meta() IPersistentMap
func (*NodeSeq) WithMeta ¶
func (s *NodeSeq) WithMeta(meta IPersistentMap) any
type NumberMethods ¶
type NumberMethods struct{}
NumberMethods is a struct with methods that map to Clojure's Number class' static methods.
func (*NumberMethods) Add ¶
func (nm *NumberMethods) Add(x, y any) any
func (*NumberMethods) AddP ¶
func (nm *NumberMethods) AddP(x, y any) any
func (*NumberMethods) And ¶
func (nm *NumberMethods) And(x, y any) any
func (*NumberMethods) AndNot ¶ added in v0.6.0
func (nm *NumberMethods) AndNot(x, y any) any
func (*NumberMethods) BooleanArray ¶
func (nm *NumberMethods) BooleanArray(sizeOrSeq any) []bool
func (*NumberMethods) BooleanArrayInit ¶
func (nm *NumberMethods) BooleanArrayInit(size int, init any) []bool
func (*NumberMethods) Booleans ¶
func (nm *NumberMethods) Booleans(x any) []bool
func (*NumberMethods) ByteArray ¶
func (nm *NumberMethods) ByteArray(sizeOrSeq any) []int8
func (*NumberMethods) ByteArrayInit ¶
func (nm *NumberMethods) ByteArrayInit(size int, initOrSeq any) []int8
func (*NumberMethods) Bytes ¶
func (nm *NumberMethods) Bytes(x any) []int8
func (*NumberMethods) CharArray ¶
func (nm *NumberMethods) CharArray(sizeOrSeq any) []Char
func (*NumberMethods) CharArrayInit ¶
func (nm *NumberMethods) CharArrayInit(size int, init any) []Char
func (*NumberMethods) Chars ¶
func (nm *NumberMethods) Chars(x any) []Char
func (*NumberMethods) ClearBit ¶
func (nm *NumberMethods) ClearBit(x, y any) int64
func (*NumberMethods) Compare ¶ added in v0.2.7
func (nm *NumberMethods) Compare(x, y any) int
func (*NumberMethods) Dec ¶
func (nm *NumberMethods) Dec(x any) any
func (*NumberMethods) DecP ¶ added in v0.6.0
func (nm *NumberMethods) DecP(v any) any
func (*NumberMethods) Divide ¶
func (nm *NumberMethods) Divide(x, y any) any
func (*NumberMethods) DoubleArray ¶
func (nm *NumberMethods) DoubleArray(sizeOrSeq any) []float64
func (*NumberMethods) DoubleArrayInit ¶
func (nm *NumberMethods) DoubleArrayInit(size int, init any) []float64
func (*NumberMethods) Doubles ¶
func (nm *NumberMethods) Doubles(x any) []float64
func (*NumberMethods) Equiv ¶
func (nm *NumberMethods) Equiv(x, y any) bool
func (*NumberMethods) FlipBit ¶
func (nm *NumberMethods) FlipBit(x, y any) int64
func (*NumberMethods) FloatArray ¶
func (nm *NumberMethods) FloatArray(sizeOrSeq any) []float32
func (*NumberMethods) FloatArrayInit ¶
func (nm *NumberMethods) FloatArrayInit(size int, init any) []float32
func (*NumberMethods) Floats ¶
func (nm *NumberMethods) Floats(x any) []float32
func (*NumberMethods) Gt ¶
func (nm *NumberMethods) Gt(x, y any) bool
func (*NumberMethods) Gte ¶
func (nm *NumberMethods) Gte(x, y any) bool
func (*NumberMethods) Inc ¶
func (nm *NumberMethods) Inc(v any) any
func (*NumberMethods) IncP ¶ added in v0.6.0
func (nm *NumberMethods) IncP(v any) any
func (*NumberMethods) IntArray ¶
func (nm *NumberMethods) IntArray(sizeOrSeq any) []int
func (*NumberMethods) IntArrayInit ¶
func (nm *NumberMethods) IntArrayInit(size int, init any) []int
func (*NumberMethods) Ints ¶
func (nm *NumberMethods) Ints(x any) []int
func (*NumberMethods) IsNeg ¶
func (nm *NumberMethods) IsNeg(x any) bool
func (*NumberMethods) IsPos ¶
func (nm *NumberMethods) IsPos(x any) bool
func (*NumberMethods) IsZero ¶
func (nm *NumberMethods) IsZero(x any) bool
func (*NumberMethods) LongArray ¶
func (nm *NumberMethods) LongArray(sizeOrSeq any) []int64
func (*NumberMethods) LongArrayInit ¶
func (nm *NumberMethods) LongArrayInit(size int, init any) []int64
func (*NumberMethods) Longs ¶
func (nm *NumberMethods) Longs(x any) []int64
func (*NumberMethods) Lt ¶
func (nm *NumberMethods) Lt(x, y any) bool
func (*NumberMethods) Lte ¶
func (nm *NumberMethods) Lte(x, y any) bool
func (*NumberMethods) Max ¶
func (nm *NumberMethods) Max(x, y any) any
func (*NumberMethods) Min ¶
func (nm *NumberMethods) Min(x, y any) any
func (*NumberMethods) Minus ¶
func (nm *NumberMethods) Minus(x, y any) any
func (*NumberMethods) MinusP ¶
func (nm *NumberMethods) MinusP(x, y any) any
func (*NumberMethods) Multiply ¶
func (nm *NumberMethods) Multiply(x, y any) any
func (*NumberMethods) MultiplyP ¶
func (nm *NumberMethods) MultiplyP(x, y any) any
func (*NumberMethods) Not ¶ added in v0.6.0
func (nm *NumberMethods) Not(x any) any
func (*NumberMethods) Num ¶ added in v0.6.5
func (nm *NumberMethods) Num(x any) any
func (*NumberMethods) Or ¶ added in v0.6.0
func (nm *NumberMethods) Or(x, y any) any
func (*NumberMethods) Quotient ¶
func (nm *NumberMethods) Quotient(x, y any) any
func (*NumberMethods) Rationalize ¶ added in v0.6.1
func (nm *NumberMethods) Rationalize(x any) any
func (*NumberMethods) Remainder ¶
func (nm *NumberMethods) Remainder(x, y any) any
func (*NumberMethods) SetBit ¶
func (nm *NumberMethods) SetBit(x, y any) any
func (*NumberMethods) ShiftLeft ¶
func (nm *NumberMethods) ShiftLeft(x, y any) int64
func (*NumberMethods) ShiftRight ¶
func (nm *NumberMethods) ShiftRight(x, y any) int64
func (*NumberMethods) ShortArray ¶
func (nm *NumberMethods) ShortArray(sizeOrSeq any) []int16
func (*NumberMethods) ShortArrayInit ¶
func (nm *NumberMethods) ShortArrayInit(size int, init any) []int16
func (*NumberMethods) Shorts ¶
func (nm *NumberMethods) Shorts(x any) []int16
func (*NumberMethods) TestBit ¶
func (nm *NumberMethods) TestBit(x, y any) bool
func (*NumberMethods) UncheckedAdd ¶
func (nm *NumberMethods) UncheckedAdd(x, y any) any
func (*NumberMethods) UncheckedDec ¶
func (nm *NumberMethods) UncheckedDec(x any) any
func (*NumberMethods) UncheckedIntDivide ¶
func (nm *NumberMethods) UncheckedIntDivide(x, y int) any
func (*NumberMethods) Unchecked_inc ¶
func (nm *NumberMethods) Unchecked_inc(v any) any
func (*NumberMethods) Unchecked_int_add ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_add(x, y any) any
func (*NumberMethods) Unchecked_int_dec ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_dec(x any) any
func (*NumberMethods) Unchecked_int_inc ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_inc(x any) any
func (*NumberMethods) Unchecked_int_multiply ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_multiply(x, y any) any
func (*NumberMethods) Unchecked_int_negate ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_negate(x any) any
func (*NumberMethods) Unchecked_int_remainder ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_remainder(x, y any) any
func (*NumberMethods) Unchecked_int_subtract ¶ added in v0.7.6
func (nm *NumberMethods) Unchecked_int_subtract(x, y any) any
func (*NumberMethods) Unchecked_minus ¶
func (nm *NumberMethods) Unchecked_minus(x, y any) any
func (*NumberMethods) Unchecked_multiply ¶
func (nm *NumberMethods) Unchecked_multiply(x, y any) any
func (*NumberMethods) Unchecked_negate ¶
func (nm *NumberMethods) Unchecked_negate(x any) any
func (*NumberMethods) UnsignedShiftRight ¶
func (nm *NumberMethods) UnsignedShiftRight(x, y any) int64
func (*NumberMethods) Xor ¶ added in v0.6.0
func (nm *NumberMethods) Xor(x, y any) any
type PersistentHashMap ¶
type PersistentHashMap struct {
// contains filtered or unexported fields
}
func (*PersistentHashMap) ApplyTo ¶
func (m *PersistentHashMap) ApplyTo(args ISeq) any
func (*PersistentHashMap) Assoc ¶
func (m *PersistentHashMap) Assoc(key, val any) Associative
func (*PersistentHashMap) AssocEx ¶
func (m *PersistentHashMap) AssocEx(key, val any) IPersistentMap
func (*PersistentHashMap) Cons ¶
func (m *PersistentHashMap) Cons(o any) Conser
func (*PersistentHashMap) ContainsKey ¶
func (m *PersistentHashMap) ContainsKey(k any) bool
func (*PersistentHashMap) Count ¶
func (m *PersistentHashMap) Count() int
func (*PersistentHashMap) Empty ¶
func (m *PersistentHashMap) Empty() IPersistentCollection
func (*PersistentHashMap) EntryAt ¶
func (m *PersistentHashMap) EntryAt(key any) IMapEntry
func (*PersistentHashMap) Equiv ¶
func (m *PersistentHashMap) Equiv(o any) bool
func (*PersistentHashMap) Hash ¶ added in v0.6.0
func (m *PersistentHashMap) Hash() uint32
func (*PersistentHashMap) HashEq ¶
func (m *PersistentHashMap) HashEq() uint32
func (*PersistentHashMap) Invoke ¶
func (m *PersistentHashMap) Invoke(args ...any) any
func (*PersistentHashMap) Meta ¶
func (m *PersistentHashMap) Meta() IPersistentMap
func (*PersistentHashMap) Reduce ¶
func (m *PersistentHashMap) Reduce(f IFn) any
func (*PersistentHashMap) ReduceInit ¶
func (m *PersistentHashMap) ReduceInit(f IFn, init any) any
func (*PersistentHashMap) Seq ¶
func (m *PersistentHashMap) Seq() ISeq
func (*PersistentHashMap) String ¶
func (m *PersistentHashMap) String() string
func (*PersistentHashMap) ValAt ¶
func (m *PersistentHashMap) ValAt(key any) any
func (*PersistentHashMap) ValAtDefault ¶
func (m *PersistentHashMap) ValAtDefault(key, notFound any) any
func (*PersistentHashMap) WithMeta ¶
func (m *PersistentHashMap) WithMeta(meta IPersistentMap) any
func (*PersistentHashMap) Without ¶
func (m *PersistentHashMap) Without(key any) IPersistentMap
type PersistentHashSet ¶
type PersistentHashSet = Set
type PersistentQueue ¶ added in v0.7.6
type PersistentQueue struct {
// contains filtered or unexported fields
}
PersistentQueue is an immutable FIFO collection compatible with clojure.lang.PersistentQueue.
func (*PersistentQueue) ApplyTo ¶ added in v0.7.6
func (q *PersistentQueue) ApplyTo(args ISeq) any
func (*PersistentQueue) Cons ¶ added in v0.7.6
func (q *PersistentQueue) Cons(value any) Conser
Cons implements Clojure's conj behavior for queues by appending at the rear.
func (*PersistentQueue) Count ¶ added in v0.7.6
func (q *PersistentQueue) Count() int
func (*PersistentQueue) Empty ¶ added in v0.7.6
func (q *PersistentQueue) Empty() IPersistentCollection
func (*PersistentQueue) Equals ¶ added in v0.7.6
func (q *PersistentQueue) Equals(other any) bool
func (*PersistentQueue) Equiv ¶ added in v0.7.6
func (q *PersistentQueue) Equiv(other any) bool
func (*PersistentQueue) Invoke ¶ added in v0.7.6
func (q *PersistentQueue) Invoke(args ...any) any
JVM static field syntax is emitted both as PersistentQueue/EMPTY and as the zero-argument form (PersistentQueue/EMPTY). Accept the latter while keeping the value usable directly as a collection.
func (*PersistentQueue) Meta ¶ added in v0.7.6
func (q *PersistentQueue) Meta() IPersistentMap
func (*PersistentQueue) Peek ¶ added in v0.7.6
func (q *PersistentQueue) Peek() any
func (*PersistentQueue) Pop ¶ added in v0.7.6
func (q *PersistentQueue) Pop() IPersistentStack
func (*PersistentQueue) Seq ¶ added in v0.7.6
func (q *PersistentQueue) Seq() ISeq
func (*PersistentQueue) String ¶ added in v0.7.6
func (q *PersistentQueue) String() string
func (*PersistentQueue) WithMeta ¶ added in v0.7.6
func (q *PersistentQueue) WithMeta(meta IPersistentMap) any
type PersistentStructMap ¶
type PersistentStructMap struct {
// contains filtered or unexported fields
}
func ConstructPersistentStructMap ¶
func ConstructPersistentStructMap(def *PersistentStructMapDef, valseq ISeq) *PersistentStructMap
func CreatePersistentStructMap ¶ added in v0.4.0
func CreatePersistentStructMap(def *PersistentStructMapDef, keyvals ISeq) *PersistentStructMap
Object[] vals = new Object[def.keyslots.count()]; IPersistentMap ext = PersistentHashMap.EMPTY; for(; keyvals != null; keyvals = keyvals.next().next())
{
if(keyvals.next() == null)
throw new IllegalArgumentException(String.format("No value supplied for key: %s", keyvals.first()));
Object k = keyvals.first();
Object v = RT.second(keyvals);
Map.Entry e = def.keyslots.entryAt(k);
if(e != null)
vals[(Integer) e.getValue()] = v;
else
ext = ext.assoc(k, v);
}
return new PersistentStructMap(null, def, vals, ext);
func (*PersistentStructMap) ApplyTo ¶
func (m *PersistentStructMap) ApplyTo(args ISeq) any
func (*PersistentStructMap) Assoc ¶
func (m *PersistentStructMap) Assoc(k any, v any) Associative
func (*PersistentStructMap) AssocEx ¶
func (m *PersistentStructMap) AssocEx(k, v any) IPersistentMap
func (*PersistentStructMap) Cons ¶
func (m *PersistentStructMap) Cons(x any) Conser
func (*PersistentStructMap) ContainsKey ¶
func (m *PersistentStructMap) ContainsKey(k any) bool
func (*PersistentStructMap) Count ¶
func (m *PersistentStructMap) Count() int
func (*PersistentStructMap) Empty ¶
func (m *PersistentStructMap) Empty() IPersistentCollection
func (*PersistentStructMap) EntryAt ¶
func (m *PersistentStructMap) EntryAt(k any) IMapEntry
func (*PersistentStructMap) Equiv ¶
func (m *PersistentStructMap) Equiv(o any) bool
func (*PersistentStructMap) Hash ¶ added in v0.6.0
func (m *PersistentStructMap) Hash() uint32
func (*PersistentStructMap) HashEq ¶
func (m *PersistentStructMap) HashEq() uint32
func (*PersistentStructMap) Invoke ¶
func (m *PersistentStructMap) Invoke(args ...any) any
func (*PersistentStructMap) Meta ¶
func (m *PersistentStructMap) Meta() IPersistentMap
func (*PersistentStructMap) Seq ¶
func (m *PersistentStructMap) Seq() ISeq
func (*PersistentStructMap) ValAt ¶
func (m *PersistentStructMap) ValAt(key any) any
func (*PersistentStructMap) ValAtDefault ¶
func (m *PersistentStructMap) ValAtDefault(key, def any) any
func (*PersistentStructMap) WithMeta ¶
func (m *PersistentStructMap) WithMeta(meta IPersistentMap) any
func (*PersistentStructMap) Without ¶
func (m *PersistentStructMap) Without(k any) IPersistentMap
type PersistentStructMapDef ¶
type PersistentStructMapDef struct {
// contains filtered or unexported fields
}
func CreatePersistentStructMapSlotMap ¶
func CreatePersistentStructMapSlotMap(keys ISeq) *PersistentStructMapDef
type PersistentTreeMap ¶ added in v0.6.5
type PersistentTreeMap = SortedMap
type PersistentTreeSet ¶ added in v0.6.5
type PersistentTreeSet = SortedSet
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
func (*Range) ChunkedFirst ¶
func (*Range) ChunkedMore ¶
func (*Range) ChunkedNext ¶
func (*Range) Empty ¶
func (r *Range) Empty() IPersistentCollection
func (*Range) ForceChunk ¶
func (r *Range) ForceChunk()
func (*Range) Meta ¶
func (r *Range) Meta() IPersistentMap
func (*Range) WithMeta ¶
func (r *Range) WithMeta(meta IPersistentMap) any
type Ratio ¶
type Ratio struct {
// contains filtered or unexported fields
}
Ratio is a value that represents a ratio.
func NewRatioBigInt ¶
func NewRatioGoBigInt ¶
func (*Ratio) BigIntegerValue ¶
func (*Ratio) Denominator ¶
type ReadablePrinter ¶ added in v0.7.6
ReadablePrinter is implemented by hosted JVM compatibility values whose Clojure readable representation cannot be inferred from their Go type.
type Record ¶ added in v0.7.2
type Record struct {
RecordMarker
// contains filtered or unexported fields
}
Record is the descriptor-backed implementation used by interpreted code. AOT emits a concrete Go struct with the same RecordValue contract.
func NewRecord ¶ added in v0.7.2
func NewRecord(recordType *RecordType, values ...any) *Record
func (*Record) Assoc ¶ added in v0.7.2
func (r *Record) Assoc(key, value any) Associative
func (*Record) AssocEx ¶ added in v0.7.2
func (r *Record) AssocEx(key, value any) IPersistentMap
func (*Record) ContainsKey ¶ added in v0.7.2
func (*Record) Empty ¶ added in v0.7.2
func (r *Record) Empty() IPersistentCollection
func (*Record) Meta ¶ added in v0.7.2
func (r *Record) Meta() IPersistentMap
func (*Record) RecordExtMap ¶ added in v0.7.2
func (r *Record) RecordExtMap() IPersistentMap
func (*Record) RecordField ¶ added in v0.7.2
func (*Record) RecordMeta ¶ added in v0.7.2
func (r *Record) RecordMeta() IPersistentMap
func (*Record) RecordType ¶ added in v0.7.2
func (r *Record) RecordType() *RecordType
func (*Record) RecordWithExtMap ¶ added in v0.7.2
func (r *Record) RecordWithExtMap(ext IPersistentMap) RecordValue
func (*Record) RecordWithField ¶ added in v0.7.2
func (r *Record) RecordWithField(index int, value any) RecordValue
func (*Record) RecordWithMeta ¶ added in v0.7.2
func (r *Record) RecordWithMeta(meta IPersistentMap) RecordValue
func (*Record) ValAtDefault ¶ added in v0.7.2
func (*Record) WithMeta ¶ added in v0.7.2
func (r *Record) WithMeta(meta IPersistentMap) any
func (*Record) Without ¶ added in v0.7.2
func (r *Record) Without(key any) IPersistentMap
type RecordConstructor ¶ added in v0.7.2
type RecordConstructor struct {
// contains filtered or unexported fields
}
RecordConstructor is the first-class root value of ->Type and map->Type. Keeping its descriptor explicit lets AOT direct-link any record constructor without recognizing source-level names.
func NewRecordConstructor ¶ added in v0.7.2
func NewRecordConstructor( recordType *RecordType, fromMap bool, ) *RecordConstructor
func (*RecordConstructor) ApplyTo ¶ added in v0.7.2
func (c *RecordConstructor) ApplyTo(args ISeq) any
func (*RecordConstructor) FromMap ¶ added in v0.7.2
func (c *RecordConstructor) FromMap() bool
func (*RecordConstructor) Invoke ¶ added in v0.7.2
func (c *RecordConstructor) Invoke(args ...any) any
func (*RecordConstructor) RecordType ¶ added in v0.7.2
func (c *RecordConstructor) RecordType() *RecordType
type RecordMarker ¶ added in v0.7.2
type RecordMarker struct{}
RecordMarker lets generated record implementations satisfy the private marker methods on IRecord and Counted by embedding an exported Go type.
type RecordType ¶ added in v0.7.2
type RecordType struct {
// contains filtered or unexported fields
}
RecordType is the backend-neutral identity and field layout of a defrecord. Runtime records and AOT-generated Go records share the same descriptor.
func InternRecordType ¶ added in v0.7.2
func InternRecordType(namespace, name string, fieldNames ...string) *RecordType
InternRecordType returns the canonical descriptor for a qualified record name. Reusing a name with a different field layout is an error.
func (*RecordType) FieldCount ¶ added in v0.7.2
func (t *RecordType) FieldCount() int
func (*RecordType) FieldIndex ¶ added in v0.7.2
func (t *RecordType) FieldIndex(key Keyword) (int, bool)
func (*RecordType) FieldKeys ¶ added in v0.7.2
func (t *RecordType) FieldKeys() []Keyword
func (*RecordType) FieldNames ¶ added in v0.7.2
func (t *RecordType) FieldNames() []string
func (*RecordType) FullName ¶ added in v0.7.2
func (t *RecordType) FullName() string
func (*RecordType) Name ¶ added in v0.7.2
func (t *RecordType) Name() string
func (*RecordType) Namespace ¶ added in v0.7.2
func (t *RecordType) Namespace() string
func (*RecordType) String ¶ added in v0.7.2
func (t *RecordType) String() string
type RecordValue ¶ added in v0.7.2
type RecordValue interface {
IRecord
IPersistentMap
IObj
IFn
IHashEq
Hasher
RecordType() *RecordType
RecordField(index int) any
RecordExtMap() IPersistentMap
RecordMeta() IPersistentMap
RecordWithField(index int, value any) RecordValue
RecordWithExtMap(ext IPersistentMap) RecordValue
RecordWithMeta(meta IPersistentMap) RecordValue
}
RecordValue is the small interface shared by interpreted and generated records. The ordinary Clojure collection methods are implemented in terms of these operations.
func NewRecordFromMap ¶ added in v0.7.2
func NewRecordFromMap(recordType *RecordType, value any) RecordValue
type RecurError ¶
type RecurError struct {
Target interface{}
Args []interface{}
}
RecurError is an error returned by a recur form.
func (*RecurError) Error ¶
func (e *RecurError) Error() string
func (*RecurError) Is ¶
func (e *RecurError) Is(err error) bool
Is returns true if the given error is a RecurError with the same target.
type RecurTarget ¶
type RecurTarget struct {
}
func NewRecurTarget ¶
func NewRecurTarget() *RecurTarget
type Reduced ¶
type Reduced struct {
// contains filtered or unexported fields
}
func NewReduced ¶
func NewReduced(v interface{}) *Reduced
type Ref ¶
type Ref struct {
// contains filtered or unexported fields
}
Ref is a reference to a value that can be updated transactionally.
type RegexpMatcher ¶
type RegexpMatcher struct {
// contains filtered or unexported fields
}
RegexpMatcher is a matcher that matches a string against a regular expression. It's a wrapper around standard library functions. We implement this to simplify a translation of clojure regexp core functions to go.
func NewRegexpMatcher ¶
func NewRegexpMatcher(re *regexp.Regexp, s string) *RegexpMatcher
NewRegexpMatcher creates a new RegexpMatcher.
func (*RegexpMatcher) AppendReplacement ¶
func (m *RegexpMatcher) AppendReplacement(sb io.Writer, replacement string) *RegexpMatcher
AppendReplacement implements a non-terminal append-and-replace step.
func (*RegexpMatcher) AppendTail ¶
func (m *RegexpMatcher) AppendTail(sb io.Writer)
AppendTail implements a terminal append-and-replace step.
func (*RegexpMatcher) End ¶ added in v0.7.6
func (m *RegexpMatcher) End() int
End returns the offset immediately after the most recent match.
func (*RegexpMatcher) Find ¶
func (m *RegexpMatcher) Find() bool
Find attempts to find the next subsequence of the input sequence that matches the pattern.
func (*RegexpMatcher) Group ¶
func (m *RegexpMatcher) Group() string
Group returns the input subsequence matched by the previous match.
func (*RegexpMatcher) GroupCount ¶
func (m *RegexpMatcher) GroupCount() int
GroupCount returns the number of capturing groups in this matcher's pattern.
func (*RegexpMatcher) GroupInt ¶
func (m *RegexpMatcher) GroupInt(group int) any
GroupInt returns the input subsequence captured by the given group during the previous match operation.
func (*RegexpMatcher) Matches ¶
func (m *RegexpMatcher) Matches() bool
Matches attempts to match the entire region against the pattern.
func (*RegexpMatcher) ResolveFieldOrMethod ¶ added in v0.7.1
func (m *RegexpMatcher) ResolveFieldOrMethod( name string, ) (interface{}, bool)
ResolveFieldOrMethod keeps interop with the runtime-owned matcher on direct fixed-arity calls. Matchers are short-lived, so resolving their bound Go methods through reflection would otherwise allocate a method value and a reflection adapter for every matcher.
type Repeat ¶
type Repeat struct {
// contains filtered or unexported fields
}
func (*Repeat) Empty ¶
func (r *Repeat) Empty() IPersistentCollection
func (*Repeat) Meta ¶
func (r *Repeat) Meta() IPersistentMap
func (*Repeat) ReduceInit ¶
func (*Repeat) WithMeta ¶
func (r *Repeat) WithMeta(meta IPersistentMap) any
type Reversible ¶
type Reversible interface {
RSeq() ISeq
}
type RoundingMode ¶ added in v0.7.6
type RoundingMode string
const ( RoundingModeDown RoundingMode = "DOWN" RoundingModeHalfEven RoundingMode = "HALF_EVEN" RoundingModeFloor RoundingMode = "FLOOR" RoundingModeCeiling RoundingMode = "CEILING" )
type Sequential ¶
type Sequential interface {
// contains filtered or unexported methods
}
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set represents a map of glojure values.
func (*Set) AsTransient ¶
func (s *Set) AsTransient() ITransientCollection
func (*Set) Disjoin ¶
func (s *Set) Disjoin(v any) IPersistentSet
func (*Set) Empty ¶
func (s *Set) Empty() IPersistentCollection
func (*Set) Meta ¶
func (s *Set) Meta() IPersistentMap
func (*Set) WithMeta ¶
func (s *Set) WithMeta(meta IPersistentMap) any
type SliceChunk ¶
type SliceChunk struct {
// contains filtered or unexported fields
}
func NewSliceChunk ¶
func NewSliceChunk(slc []interface{}) *SliceChunk
func (*SliceChunk) Count ¶
func (sc *SliceChunk) Count() int
func (*SliceChunk) DropFirst ¶
func (sc *SliceChunk) DropFirst() IChunk
func (*SliceChunk) Nth ¶
func (sc *SliceChunk) Nth(i int) interface{}
func (*SliceChunk) NthDefault ¶
func (sc *SliceChunk) NthDefault(i int, def interface{}) interface{}
func (*SliceChunk) ReduceInit ¶
func (sc *SliceChunk) ReduceInit(fn IFn, init interface{}) interface{}
type SliceSeq ¶
type SliceSeq struct {
// contains filtered or unexported fields
}
SliceSeq is an implementation of ISeq for slices.
func (*SliceSeq) Empty ¶
func (s *SliceSeq) Empty() IPersistentCollection
func (*SliceSeq) Meta ¶
func (s *SliceSeq) Meta() IPersistentMap
func (*SliceSeq) WithMeta ¶
func (s *SliceSeq) WithMeta(meta IPersistentMap) any
type SortedMap ¶ added in v0.6.5
type SortedMap struct {
// contains filtered or unexported fields
}
SortedMap wraps a Map and provides sorted iteration order by keys.
func (*SortedMap) Assoc ¶ added in v0.6.5
func (s *SortedMap) Assoc(key, val any) Associative
func (*SortedMap) AssocEx ¶ added in v0.6.5
func (s *SortedMap) AssocEx(key, val any) IPersistentMap
func (*SortedMap) Comparator ¶ added in v0.6.5
Sorted interface
func (*SortedMap) ContainsKey ¶ added in v0.6.5
func (*SortedMap) Empty ¶ added in v0.6.5
func (s *SortedMap) Empty() IPersistentCollection
func (*SortedMap) Meta ¶ added in v0.6.5
func (s *SortedMap) Meta() IPersistentMap
func (*SortedMap) ReduceInit ¶ added in v0.6.5
Reduce support
func (*SortedMap) Rseq ¶ added in v0.6.5
Rseq is an alias for RSeq, needed because FieldOrMethod capitalizes only the first letter of "rseq" to get "Rseq", not "RSeq".
func (*SortedMap) ValAtDefault ¶ added in v0.6.5
func (*SortedMap) WithMeta ¶ added in v0.6.5
func (s *SortedMap) WithMeta(meta IPersistentMap) any
func (*SortedMap) Without ¶ added in v0.6.5
func (s *SortedMap) Without(key any) IPersistentMap
type SortedSet ¶ added in v0.6.5
type SortedSet struct {
Set
// contains filtered or unexported fields
}
SortedSet wraps a Set and provides sorted iteration order.
func (*SortedSet) Comparator ¶ added in v0.6.5
func (*SortedSet) Disjoin ¶ added in v0.6.5
func (s *SortedSet) Disjoin(v any) IPersistentSet
func (*SortedSet) Empty ¶ added in v0.6.5
func (s *SortedSet) Empty() IPersistentCollection
func (*SortedSet) Rseq ¶ added in v0.6.5
Rseq is an alias for RSeq, needed because FieldOrMethod capitalizes only the first letter of "rseq" to get "Rseq", not "RSeq".
func (*SortedSet) WithMeta ¶ added in v0.6.5
func (s *SortedSet) WithMeta(meta IPersistentMap) any
type StackFrame ¶
type Stacker ¶
type Stacker interface {
Stack() []StackFrame
}
Stacker is an interface for retrieving stack traces.
type StringMethod ¶ added in v0.6.5
StringMethod is the signature for JVM-style instance methods on java.lang.String. The receiver is passed as the first argument and any further arguments arrive in rest. Bridge implementations are responsible for argument-count validation and type coercion.
type StringSeq ¶
type StringSeq struct {
// contains filtered or unexported fields
}
StringSeq exposes the Unicode code points of an immutable Go string as Char values, matching Clojure's character sequence semantics.
func NewStringSeq ¶
func (*StringSeq) Drop ¶
func (s *StringSeq) Drop(n int) Sequential
func (*StringSeq) Empty ¶
func (s *StringSeq) Empty() IPersistentCollection
func (*StringSeq) Meta ¶
func (s *StringSeq) Meta() IPersistentMap
func (*StringSeq) WithMeta ¶
func (s *StringSeq) WithMeta(meta IPersistentMap) any
type SubVector ¶
type SubVector struct {
// contains filtered or unexported fields
}
func NewSubVector ¶
func NewSubVector(meta IPersistentMap, v IPersistentVector, start, end int) *SubVector
func (*SubVector) Assoc ¶
func (v *SubVector) Assoc(key, val interface{}) Associative
func (*SubVector) AssocN ¶
func (v *SubVector) AssocN(i int, val interface{}) IPersistentVector
func (*SubVector) ContainsKey ¶
func (*SubVector) Empty ¶
func (v *SubVector) Empty() IPersistentCollection
func (*SubVector) Meta ¶
func (v *SubVector) Meta() IPersistentMap
func (*SubVector) NthDefault ¶
func (*SubVector) Pop ¶
func (v *SubVector) Pop() IPersistentStack
func (*SubVector) ValAtDefault ¶
func (v *SubVector) ValAtDefault(k, def interface{}) interface{}
func (*SubVector) WithMeta ¶
func (v *SubVector) WithMeta(meta IPersistentMap) interface{}
type Symbol ¶
type Symbol struct {
// contains filtered or unexported fields
}
func InternSymbol ¶
func NewSymbolUnchecked ¶ added in v0.7.0
NewSymbolUnchecked constructs a symbol without revalidating its spelling. It is intended for generated code whose symbol literals were already validated by the reader at compile time.
func (*Symbol) HasNamespace ¶ added in v0.6.5
HasNamespace returns true if the symbol has an explicit namespace, even if that namespace is the empty string.
func (*Symbol) Meta ¶
func (s *Symbol) Meta() IPersistentMap
func (*Symbol) WithMeta ¶
func (s *Symbol) WithMeta(meta IPersistentMap) any
type TaggedLiteral ¶ added in v0.7.6
type TaggedLiteral struct {
// contains filtered or unexported fields
}
TaggedLiteral is the portable representation returned for an EDN reader tag.
func (*TaggedLiteral) Equals ¶ added in v0.7.6
func (t *TaggedLiteral) Equals(other any) bool
func (*TaggedLiteral) Equiv ¶ added in v0.7.6
func (t *TaggedLiteral) Equiv(other any) bool
func (*TaggedLiteral) Form ¶ added in v0.7.6
func (t *TaggedLiteral) Form() any
func (*TaggedLiteral) Meta ¶ added in v0.7.6
func (t *TaggedLiteral) Meta() IPersistentMap
func (*TaggedLiteral) String ¶ added in v0.7.6
func (t *TaggedLiteral) String() string
func (*TaggedLiteral) Tag ¶ added in v0.7.6
func (t *TaggedLiteral) Tag() *Symbol
func (*TaggedLiteral) ValAt ¶ added in v0.7.6
func (t *TaggedLiteral) ValAt(key any) any
func (*TaggedLiteral) ValAtDefault ¶ added in v0.7.6
func (t *TaggedLiteral) ValAtDefault(key, notFound any) any
func (*TaggedLiteral) WithMeta ¶ added in v0.7.6
func (t *TaggedLiteral) WithMeta(meta IPersistentMap) any
type TimeoutError ¶
type TimeoutError struct {
// contains filtered or unexported fields
}
func (*TimeoutError) Is ¶
func (e *TimeoutError) Is(other error) bool
type TransientMap ¶
type TransientMap struct {
IPersistentMap
// contains filtered or unexported fields
}
func (*TransientMap) ApplyTo ¶ added in v0.2.3
func (m *TransientMap) ApplyTo(args ISeq) any
func (*TransientMap) Assoc ¶
func (m *TransientMap) Assoc(k, v any) Associative
func (*TransientMap) Conj ¶
func (m *TransientMap) Conj(v any) Conjer
func (*TransientMap) Invoke ¶ added in v0.2.3
func (m *TransientMap) Invoke(args ...any) any
func (*TransientMap) Meta ¶ added in v0.2.3
func (m *TransientMap) Meta() IPersistentMap
func (*TransientMap) Persistent ¶
func (m *TransientMap) Persistent() IPersistentCollection
func (*TransientMap) Reduce ¶ added in v0.2.3
func (m *TransientMap) Reduce(f IFn) any
func (*TransientMap) ReduceInit ¶ added in v0.2.3
func (m *TransientMap) ReduceInit(f IFn, init any) any
func (*TransientMap) Without ¶ added in v0.6.5
func (m *TransientMap) Without(key any) IPersistentMap
type TransientSet ¶
type TransientSet struct {
*Set
// contains filtered or unexported fields
}
func (*TransientSet) Conj ¶
func (s *TransientSet) Conj(v any) Conjer
func (*TransientSet) Disjoin ¶ added in v0.6.5
func (s *TransientSet) Disjoin(v any) ITransientSet
func (*TransientSet) Persistent ¶
func (s *TransientSet) Persistent() IPersistentCollection
type TransientVector ¶
type TransientVector struct {
// contains filtered or unexported fields
}
Vector is a vector of values.
func (*TransientVector) ApplyTo ¶
func (t *TransientVector) ApplyTo(args ISeq) any
func (*TransientVector) Assoc ¶
func (t *TransientVector) Assoc(key, val any) ITransientAssociative
func (*TransientVector) AssocN ¶
func (t *TransientVector) AssocN(i int, val any) ITransientVector
func (*TransientVector) Conj ¶
func (t *TransientVector) Conj(o any) Conjer
func (*TransientVector) Count ¶
func (t *TransientVector) Count() int
func (*TransientVector) Invoke ¶
func (t *TransientVector) Invoke(args ...any) any
func (*TransientVector) Nth ¶
func (t *TransientVector) Nth(i int) any
func (*TransientVector) NthDefault ¶
func (t *TransientVector) NthDefault(i int, def any) any
func (*TransientVector) Persistent ¶
func (t *TransientVector) Persistent() IPersistentCollection
func (*TransientVector) Pop ¶
func (t *TransientVector) Pop() ITransientVector
func (*TransientVector) ValAt ¶
func (t *TransientVector) ValAt(i any) any
func (*TransientVector) ValAtDefault ¶
func (t *TransientVector) ValAtDefault(k, def any) any
type UnboundVar ¶
type UnboundVar struct {
// contains filtered or unexported fields
}
func (*UnboundVar) String ¶
func (uv *UnboundVar) String() string
type UnsupportedOperationError ¶ added in v0.4.0
type UnsupportedOperationError struct {
// contains filtered or unexported fields
}
func (*UnsupportedOperationError) Error ¶ added in v0.4.0
func (e *UnsupportedOperationError) Error() string
func (*UnsupportedOperationError) Is ¶ added in v0.4.0
func (e *UnsupportedOperationError) Is(other error) bool
type Var ¶
type Var struct {
// contains filtered or unexported fields
}
func InternVarName ¶
func InternVarReplaceRoot ¶
func NewVarWithRoot ¶
func (*Var) Meta ¶
func (v *Var) Meta() IPersistentMap
func (*Var) RemoveWatch ¶
func (v *Var) RemoveWatch(key interface{})
func (*Var) RootVersion ¶ added in v0.7.0
func (v *Var) RootVersion() *VarRootVersion
RootVersion returns the identity of the current root binding. The returned pointer changes atomically whenever BindRoot or AlterRoot installs a root.
func (*Var) SetDynamic ¶
func (*Var) SetMeta ¶
func (v *Var) SetMeta(meta IPersistentMap)
func (*Var) SetMetaLazy ¶ added in v0.7.0
func (v *Var) SetMetaLazy(fn func() IPersistentMap)
SetMetaLazy defers construction of immutable metadata until it is observed. Generated AOT loaders use this for docstrings, arglists, and source metadata that most programs never inspect.
func (*Var) SetValidator ¶
func (*Var) Watches ¶
func (v *Var) Watches() IPersistentMap
type VarRootVersion ¶ added in v0.7.0
type VarRootVersion struct {
// contains filtered or unexported fields
}
VarRootVersion is an opaque identity for one root binding. Generated optimized code uses it to verify that a Var still has the root it was compiled against before taking a direct-call path.
type VariadicFn ¶ added in v0.7.0
type VariadicFn struct {
// contains filtered or unexported fields
}
VariadicFn keeps the ordinary variadic Go call path while allowing ApplyTo to pass an argument sequence to a Clojure variadic method without realizing its rest arguments.
func NewVariadicFn ¶ added in v0.7.0
func NewVariadicFn( requiredArity int, doInvoke func(fixed []any, rest ISeq) any, ) VariadicFn
func (VariadicFn) ApplyTo ¶ added in v0.7.0
func (f VariadicFn) ApplyTo(args ISeq) any
func (VariadicFn) Invoke ¶ added in v0.7.0
func (f VariadicFn) Invoke(args ...any) any
func (VariadicFn) IsFnValue ¶ added in v0.7.2
func (VariadicFn) IsFnValue()
func (VariadicFn) Meta ¶ added in v0.7.0
func (f VariadicFn) Meta() IPersistentMap
func (VariadicFn) WithMeta ¶ added in v0.7.0
func (f VariadicFn) WithMeta(meta IPersistentMap) any
type Vector ¶
type Vector struct {
// contains filtered or unexported fields
}
Vector is a vector of values.
func (*Vector) AsTransient ¶
func (v *Vector) AsTransient() ITransientCollection
func (*Vector) Assoc ¶
func (v *Vector) Assoc(key, val any) Associative
func (*Vector) ContainsKey ¶
func (*Vector) Drop ¶
func (v *Vector) Drop(n int) Sequential
func (*Vector) Empty ¶
func (v *Vector) Empty() IPersistentCollection
func (*Vector) LastIndexOf ¶ added in v0.7.6
func (*Vector) Meta ¶
func (v *Vector) Meta() IPersistentMap
func (*Vector) Pop ¶
func (v *Vector) Pop() IPersistentStack
func (*Vector) ReplaceLast ¶ added in v0.7.2
ReplaceLast returns a persistent vector whose final value is val.
func (*Vector) Rseq ¶ added in v0.6.5
Rseq is an alias for RSeq, needed because FieldOrMethod capitalizes only the first letter of "rseq" to get "Rseq", not "RSeq".
func (*Vector) ValAtDefault ¶
func (*Vector) WithMeta ¶
func (v *Vector) WithMeta(meta IPersistentMap) any
Source Files
¶
- afn.go
- agent.go
- amapentry.go
- apersistentmap.go
- apersistentset.go
- apersistentvector.go
- apply.go
- arityfn.go
- arraylist.go
- aseq.go
- atom.go
- bigdecimal.go
- bigint.go
- box.go
- builtins.go
- catch.go
- char.go
- chunkbuffer.go
- chunkedcons.go
- class.go
- cons.go
- cycle.go
- delay.go
- environment.go
- equal.go
- error.go
- exception_info.go
- fixed_arities_generated.go
- functional.go
- gomapseq.go
- hashes.go
- ifn.go
- int64.go
- int64_box.go
- interfaces.go
- iterate.go
- iteration.go
- keyword.go
- kws.go
- lazilypersistentvector.go
- lazyseq.go
- lib.go
- list.go
- longrange.go
- map.go
- mapentry.go
- mappedseq.go
- multifn.go
- namespace.go
- numberops.go
- numbers.go
- persistentarraymap.go
- persistenthashmap.go
- persistentqueue.go
- persistentstructmap.go
- persistenttreemap.go
- range.go
- ratio.go
- record.go
- reduced.go
- ref.go
- regexp_cache.go
- regexpmatcher.go
- repeat.go
- seq.go
- set.go
- slicechunk.go
- slices.go
- sliceseq.go
- sort.go
- strconv.go
- string.go
- stringseq.go
- struct.go
- subvector.go
- symbol.go
- taggedliteral.go
- truthiness.go
- type.go
- var.go
- vector.go
- volatile.go
- writer.go