data

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 21 Imported by: 3

Documentation

Overview

Package data provides the fundamental value types and interfaces that form the core of Ale's type system. This includes all runtime data structures (keywords, lists, vectors, objects, symbols, etc.) that implement the Value interface, along with immutable collection types and equality semantics essential for data manipulation.

Index

Constants

View Source
const (
	// ErrFixedArity is raised when there are too few or many arguments
	// provided to a fixed ArityChecker
	ErrFixedArity = "expected %d arguments, got %d"

	// ErrMinimumArity is raised when there are too few arguments provided to a
	// minimum ArityChecker
	ErrMinimumArity = "expected at least %d arguments, got %d"

	// ErrRangedArity is raised when there are too few or many arguments
	// provided to a ranged ArityChecker
	ErrRangedArity = "expected between %d and %d arguments, got %d"

	// ErrTooManyArguments is raised when there are too many arguments provided
	// to a maximum ArityChecker
	ErrTooManyArguments = "too many arity check arguments"
)
View Source
const (
	ErrExpectedBytes     = "value is not bytes: %s"
	ErrIntegerOutOfRange = "integer out of byte range: %d"
)
View Source
const (
	CountKey    = Keyword("count")
	InstanceKey = Keyword("instance")
	NameKey     = Keyword("name")
	TypeKey     = Keyword("type")
)

Standard Keys

View Source
const (
	// ErrExpectedInteger is raised when the value provided to ParseInteger
	// can't be interpreted as an integer
	ErrExpectedInteger = "value is not an integer: %s"

	// ErrDivideByZero is raised when an attempt is made to perform integer
	// division by zero
	ErrDivideByZero = "divide by zero"
)
View Source
const (
	// ErrExpectedFloat is raised when a call to ParseFloat can't properly
	// interpret its input as a floating point number
	ErrExpectedFloat = "value is not a float: %s"

	// ErrExpectedRatio is raised when a call to ParseRatio can't properly
	// interpret its input as a ratio
	ErrExpectedRatio = "value is not a ratio: %s"
)
View Source
const (
	// ErrExpectedString is raised when a passed value is not a String
	ErrExpectedString = "value is not a string: %s"

	// ErrInvalidIndexes is raised when an attempt to take a substring receives
	// invalid start and end indexes
	ErrInvalidIndexes = "%d and %d are not valid start/end indices"

	// ErrInvalidStartIndex is raised when an attempt to take a substring of a
	// String specifies an ending index that is lower than the starting index
	ErrInvalidStartIndex = "%d is an invalid start index"
)
View Source
const EmptyString = String("")

EmptyString represents the... empty string

View Source
const ErrInvalidSymbol = "invalid symbol: %s"

ErrInvalidSymbol is raised when a call to ParseSymbol can't interpret its input as a proper Symbol name (local or qualified)

View Source
const ErrMapNotPaired = "map does not contain an even number of elements"

ErrMapNotPaired is raised when a call to ValuesToObject receives an odd number of args, meaning it won't be capable of zipping them into an Object

View Source
const OrMore = -1

OrMore is the constant used when you want to tell MakeArityChecker to generate a minimum arity checker

View Source
const (
	SymbolGenDigits = decimal + lower + upper + "-+"
)

Variables

View Source
var (
	// EmptyVector represents an empty Vector
	EmptyVector = Vector{}
)

Functions

func CheckAnyArity added in v0.3.0

func CheckAnyArity(int) error

CheckAnyArity allows for any number of arguments

func CheckFixedArity added in v0.3.0

func CheckFixedArity(fixed, count int) error

CheckFixedArity allows for a fixed number of arguments

func CheckMinimumArity added in v0.3.0

func CheckMinimumArity(min, count int) error

CheckMinimumArity allows for a minimum number of arguments

func CheckRangedArity added in v0.3.0

func CheckRangedArity(min, max, count int) error

CheckRangedArity allows for a ranged number of arguments

func DumpString

func DumpString(v ale.Value) string

DumpString takes a Value and dumps out a bunch of info as a string

func Equal

func Equal(l, r ale.Value) bool

func HashBytes

func HashBytes(b []byte) uint64

HashBytes returns a hash code for the provided byte slice

func HashCode

func HashCode(v ale.Value) uint64

HashCode returns a hash code for the provided Value. If the Value implements the Hashed interface, it will call us the HashCode() method. Otherwise, it will create a hash code from the stringified form of the Value

func HashInt

func HashInt(i int) uint64

HashInt returns a hash code for the provided int

func HashInt64

func HashInt64(i int64) uint64

HashInt64 returns a hash code for the provided int64

func HashString

func HashString(s string) uint64

HashString returns a hash code for the provided string

func MustCheckFixedArity added in v0.3.0

func MustCheckFixedArity(fixed, count int)

MustCheckFixedArity is CheckFixedArity, but panics if the check fails

func MustCheckMinimumArity added in v0.3.0

func MustCheckMinimumArity(min, count int)

MustCheckMinimumArity is CheckMinimumArity, but panics if the check fails

func MustCheckRangedArity added in v0.3.0

func MustCheckRangedArity(min, max, count int)

MustCheckRangedArity is CheckRangedArity, but panics if the check fails

func ToQuotedString

func ToQuotedString(v ale.Value) string

ToQuotedString converts Values to string, possibly quoting wrapped Strings

func ToString

func ToString(v ale.Value) string

Types

type Appender

type Appender interface {
	Sequence

	// Append creates a new Sequence with the given value appended to it
	Append(ale.Value) Sequence
}

Appender is a Sequence that can be appended to

type ArityChecker

type ArityChecker func(int) error

ArityChecker is the interface for arity checks

func MakeArityChecker added in v0.3.0

func MakeArityChecker(arity ...int) (ArityChecker, error)

MakeArityChecker produces an arity checker based on its parameters

type BigInt

type BigInt big.Int

BigInt represents a multi-precision integer

func (*BigInt) Add

func (l *BigInt) Add(r Number) Number

func (*BigInt) Cmp

func (l *BigInt) Cmp(r Number) Comparison

func (*BigInt) Div

func (l *BigInt) Div(r Number) Number

func (*BigInt) Equal

func (l *BigInt) Equal(r ale.Value) bool

func (*BigInt) HashCode

func (l *BigInt) HashCode() uint64

func (*BigInt) IsNaN

func (*BigInt) IsNaN() bool

func (*BigInt) IsNegInf

func (*BigInt) IsNegInf() bool

func (*BigInt) IsPosInf

func (*BigInt) IsPosInf() bool

func (*BigInt) Mod

func (l *BigInt) Mod(r Number) Number

func (*BigInt) Mul

func (l *BigInt) Mul(r Number) Number

func (*BigInt) String

func (l *BigInt) String() string

func (*BigInt) Sub

func (l *BigInt) Sub(r Number) Number

func (*BigInt) Type

func (l *BigInt) Type() ale.Type

type Bool

type Bool bool

Bool represents the data True or False

const (
	// True represents the boolean value of True
	True Bool = true

	// False represents the boolean value of false
	False Bool = false
)

func (Bool) Call added in v0.3.0

func (b Bool) Call(...ale.Value) ale.Value

func (Bool) CheckArity added in v0.3.0

func (b Bool) CheckArity(int) error

func (Bool) Equal

func (b Bool) Equal(other ale.Value) bool

func (Bool) HashCode

func (b Bool) HashCode() uint64

func (Bool) String

func (b Bool) String() string

func (Bool) Type

func (b Bool) Type() ale.Type

type Bytes added in v0.3.0

type Bytes []byte
var (
	EmptyBytes Bytes
)

func NewBytes added in v0.3.0

func NewBytes(vals ...ale.Value) Bytes

func ValuesToBytes added in v0.3.0

func ValuesToBytes(vals ...ale.Value) (Bytes, error)

func (Bytes) Append added in v0.3.0

func (b Bytes) Append(v ale.Value) Sequence

func (Bytes) Call added in v0.3.0

func (b Bytes) Call(args ...ale.Value) ale.Value

func (Bytes) Car added in v0.3.0

func (b Bytes) Car() ale.Value

func (Bytes) Cdr added in v0.3.0

func (b Bytes) Cdr() ale.Value

func (Bytes) CheckArity added in v0.3.0

func (b Bytes) CheckArity(argc int) error

func (Bytes) Count added in v0.3.0

func (b Bytes) Count() int

func (Bytes) ElementAt added in v0.3.0

func (b Bytes) ElementAt(index int) (ale.Value, bool)

func (Bytes) Equal added in v0.3.0

func (b Bytes) Equal(other ale.Value) bool

func (Bytes) HashCode added in v0.3.0

func (b Bytes) HashCode() uint64

func (Bytes) IndexOf added in v0.3.0

func (b Bytes) IndexOf(v ale.Value) (int, bool)

func (Bytes) IsEmpty added in v0.3.0

func (b Bytes) IsEmpty() bool

func (Bytes) Reverse added in v0.3.0

func (b Bytes) Reverse() Sequence

func (Bytes) Split added in v0.3.0

func (b Bytes) Split() (ale.Value, Sequence, bool)

func (Bytes) String added in v0.3.0

func (b Bytes) String() string

func (Bytes) Type added in v0.3.0

func (b Bytes) Type() ale.Type

type Call

type Call func(...ale.Value) ale.Value

Call is the type of function that can be turned into a Procedure

type Comparison

type Comparison int

Comparison represents the result of an equality comparison

const (
	LessThan Comparison = iota - 1
	EqualTo
	GreaterThan
	Incomparable
)

Comparison results

type Cons

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

Cons cells are the standard implementation of a Pair. Unlike other Pairs (ex: List, Vector), it is not treated as a Sequence

func NewCons

func NewCons(car, cdr ale.Value) *Cons

NewCons returns a new Cons cell instance

func (*Cons) Car

func (c *Cons) Car() ale.Value

func (*Cons) Cdr

func (c *Cons) Cdr() ale.Value

func (*Cons) Equal

func (c *Cons) Equal(other ale.Value) bool

func (*Cons) HashCode

func (c *Cons) HashCode() uint64

func (*Cons) String

func (c *Cons) String() string

func (*Cons) Type

func (c *Cons) Type() ale.Type

type Counted

type Counted interface {
	Sequence

	// Count returns the number of elements in this Sequence
	Count() int
}

Counted is a Sequence that returns a count of its items

type Float

type Float float64

Float represents a 64-bit floating point number

func (Float) Add

func (l Float) Add(r Number) Number

func (Float) Cmp

func (l Float) Cmp(r Number) Comparison

func (Float) Div

func (l Float) Div(r Number) Number

func (Float) Equal

func (l Float) Equal(r ale.Value) bool

func (Float) HashCode

func (l Float) HashCode() uint64

func (Float) IsNaN

func (l Float) IsNaN() bool

func (Float) IsNegInf

func (l Float) IsNegInf() bool

func (Float) IsPosInf

func (l Float) IsPosInf() bool

func (Float) Mod

func (l Float) Mod(r Number) Number

func (Float) Mul

func (l Float) Mul(r Number) Number

func (Float) String

func (l Float) String() string

func (Float) Sub

func (l Float) Sub(r Number) Number

func (Float) Type

func (l Float) Type() ale.Type

type Hashed

type Hashed interface {
	ale.Value

	// HashCode returns a hash code for this Value. Hash codes are used for
	// efficient storage and retrieval in mapped data structures like Object
	HashCode() uint64
}

Hashed can return a hash code for the value

type Indexed

type Indexed interface {
	Counted

	// ElementAt returns the element at the specified index
	ElementAt(int) (ale.Value, bool)
}

Indexed is a Sequence that has indexed elements

type Integer

type Integer int64

Integer represents a 64-bit integer

func (Integer) Add

func (l Integer) Add(r Number) Number

func (Integer) Call added in v0.3.0

func (l Integer) Call(args ...ale.Value) ale.Value

func (Integer) CheckArity added in v0.3.0

func (l Integer) CheckArity(argc int) error

func (Integer) Cmp

func (l Integer) Cmp(r Number) Comparison

func (Integer) Div

func (l Integer) Div(r Number) Number

func (Integer) Equal

func (l Integer) Equal(r ale.Value) bool

func (Integer) HashCode

func (l Integer) HashCode() uint64

func (Integer) IsNaN

func (Integer) IsNaN() bool

func (Integer) IsNegInf

func (Integer) IsNegInf() bool

func (Integer) IsPosInf

func (Integer) IsPosInf() bool

func (Integer) Mod

func (l Integer) Mod(r Number) Number

func (Integer) Mul

func (l Integer) Mul(r Number) Number

func (Integer) String

func (l Integer) String() string

func (Integer) Sub

func (l Integer) Sub(r Number) Number

func (Integer) Type

func (l Integer) Type() ale.Type

type Keyword

type Keyword string

Keyword is a Value that represents a name that resolves to itself

func (Keyword) Call

func (k Keyword) Call(args ...ale.Value) ale.Value

func (Keyword) CheckArity

func (k Keyword) CheckArity(argc int) error

func (Keyword) Equal

func (k Keyword) Equal(other ale.Value) bool

func (Keyword) HashCode

func (k Keyword) HashCode() uint64

func (Keyword) String

func (k Keyword) String() string

func (Keyword) Type

func (k Keyword) Type() ale.Type

type List

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

A List represents a singly linked List

var (
	// Null represents the absence of a Value (the empty List)
	Null *List
)

func NewList

func NewList(vals ...ale.Value) *List

NewList creates a new List instance

func (*List) Call

func (l *List) Call(args ...ale.Value) ale.Value

func (*List) Car

func (l *List) Car() ale.Value

func (*List) Cdr

func (l *List) Cdr() ale.Value

func (*List) CheckArity

func (l *List) CheckArity(argc int) error

func (*List) Count

func (l *List) Count() int

func (*List) ElementAt

func (l *List) ElementAt(index int) (ale.Value, bool)

func (*List) Equal

func (l *List) Equal(other ale.Value) bool

func (*List) HashCode

func (l *List) HashCode() uint64

func (*List) IsEmpty

func (l *List) IsEmpty() bool

func (*List) Prepend

func (l *List) Prepend(v ale.Value) Sequence

func (*List) Reverse

func (l *List) Reverse() Sequence

func (*List) Split

func (l *List) Split() (ale.Value, Sequence, bool)

func (*List) String

func (l *List) String() string

func (*List) Type

func (l *List) Type() ale.Type

type Local

type Local Name

Local represents an unqualified symbol that requires resolution

func (Local) Equal

func (l Local) Equal(other ale.Value) bool

func (Local) HashCode

func (l Local) HashCode() uint64

func (Local) Local added in v0.3.0

func (l Local) Local() Local

func (Local) String

func (l Local) String() string

func (Local) Type

func (l Local) Type() ale.Type

type Locals

type Locals []Local

Locals represent a set of Local

type Mapped

type Mapped interface {
	ale.Value

	// Get returns the value associated with the given key
	Get(ale.Value) (ale.Value, bool)
}

Mapped is the interface for Values that have accessible properties

func DumpMapped

func DumpMapped(v ale.Value) Mapped

DumpMapped takes a Value and dumps out a bunch of info as a Mapped

type Mapper

type Mapper interface {
	Sequence
	Mapped

	// Put returns a new Sequence with the Pair associated in the Mapper
	Put(Pair) Sequence

	// Remove returns a new Sequence with the Value removed from the Mapper
	Remove(ale.Value) (ale.Value, Sequence, bool)
}

Mapper is a Sequence that provides a mutable Mapped interface

type Name added in v0.3.0

type Name string

Name represents a Value's name. Not itself a Value

type Named

type Named interface {
	ale.Value

	// Name returns the name of the value
	Name() Name
}

Named is the generic interface for values that are named

type Number

type Number interface {
	ale.Typed

	// Cmp compares this Number to another Number
	Cmp(Number) Comparison

	// Add adds this Number to another Number
	Add(Number) Number

	// Sub subtracts another Number from this Number
	Sub(Number) Number

	// Mul multiplies this Number by another Number
	Mul(Number) Number

	// Div divides this Number by another Number
	Div(Number) Number

	// Mod calculates the remainder of dividing this Number by another Number
	Mod(Number) Number

	// IsNaN returns whether this Number is not a number (NaN)
	IsNaN() bool

	// IsPosInf returns whether this Number is positive infinity
	IsPosInf() bool

	// IsNegInf returns whether this Number is negative infinity
	IsNegInf() bool
}

Number describes a numeric value of some kind

func ParseFloat

func ParseFloat(s string) (Number, error)

ParseFloat attempts to parse a string representing a float

func ParseInteger

func ParseInteger(s string) (Number, error)

ParseInteger attempts to parse a string representing an integer

func ParseRatio

func ParseRatio(s string) (Number, error)

ParseRatio attempts to parse a string representing a ratio

type Object

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

Object maps a set of Values, known as keys, to another set of Values

var (
	// EmptyObject represents an empty Object
	EmptyObject *Object
)

func NewObject

func NewObject(pairs ...Pair) *Object

NewObject instantiates a new Object instance. Based on Phil Bagwell's Hashed Array Mapped Trie data structure. More information on HAMT's can be found at http://lampwww.epfl.ch/papers/idealhashtrees.pdf

func ValuesToObject

func ValuesToObject(vals ...ale.Value) (*Object, error)

ValuesToObject interprets a set of Values as an Object

func (*Object) Call

func (o *Object) Call(args ...ale.Value) ale.Value

func (*Object) Car

func (o *Object) Car() ale.Value

func (*Object) Cdr

func (o *Object) Cdr() ale.Value

func (*Object) CheckArity

func (o *Object) CheckArity(argc int) error

func (*Object) Count

func (o *Object) Count() int

func (*Object) Equal

func (o *Object) Equal(other ale.Value) bool

func (*Object) Get

func (o *Object) Get(k ale.Value) (ale.Value, bool)

func (*Object) HashCode

func (o *Object) HashCode() uint64

func (*Object) IsEmpty

func (o *Object) IsEmpty() bool

func (*Object) Pairs

func (o *Object) Pairs() Pairs

func (*Object) Put

func (o *Object) Put(p Pair) Sequence

func (*Object) Remove

func (o *Object) Remove(k ale.Value) (ale.Value, Sequence, bool)

func (*Object) Split

func (o *Object) Split() (ale.Value, Sequence, bool)

func (*Object) String

func (o *Object) String() string

func (*Object) Type

func (o *Object) Type() ale.Type

type Pair

type Pair interface {
	ale.Typed

	// Car returns the first element of the Pair
	Car() ale.Value

	// Cdr returns the second element of the Pair
	Cdr() ale.Value
}

Pair represents the interface for a binary structure, such as a Cons

type Pairs

type Pairs []Pair

Pairs represents multiple pairs

type Prepender

type Prepender interface {
	Sequence

	// Prepend creates a new Sequence with the given value prepended to it
	Prepend(ale.Value) Sequence
}

Prepender is a Sequence that can be prepended to

type Procedure

type Procedure interface {
	ale.Typed

	// Call invokes this Procedure with the provided arguments
	Call(...ale.Value) ale.Value

	// CheckArity performs a compile-time arity check
	CheckArity(int) error
}

Procedure is any Value that provides a calling interface

func MakeProcedure

func MakeProcedure(c Call, arity ...int) Procedure

MakeProcedure constructs a Procedure from a func that matches the standard calling signature

type Qualified

type Qualified interface {
	Symbol

	// Domain returns the domain part of the qualified symbol
	Domain() Local
}

Qualified represents a domain-qualified symbol

type Ratio

type Ratio big.Rat

Ratio represents a number having a numerator and denominator

func (*Ratio) Add

func (l *Ratio) Add(r Number) Number

func (*Ratio) Cmp

func (l *Ratio) Cmp(r Number) Comparison

func (*Ratio) Div

func (l *Ratio) Div(r Number) Number

func (*Ratio) Equal

func (l *Ratio) Equal(r ale.Value) bool

func (*Ratio) HashCode

func (l *Ratio) HashCode() uint64

func (*Ratio) IsNaN

func (*Ratio) IsNaN() bool

func (*Ratio) IsNegInf

func (*Ratio) IsNegInf() bool

func (*Ratio) IsPosInf

func (*Ratio) IsPosInf() bool

func (*Ratio) Mod

func (l *Ratio) Mod(r Number) Number

func (*Ratio) Mul

func (l *Ratio) Mul(r Number) Number

func (*Ratio) String

func (l *Ratio) String() string

func (*Ratio) Sub

func (l *Ratio) Sub(r Number) Number

func (*Ratio) Type

func (l *Ratio) Type() ale.Type

type Reverser

type Reverser interface {
	Sequence

	// Reverse creates a new Sequence with the elements in reverse order
	Reverse() Sequence
}

Reverser is a Sequence that can be reversed

type Sequence

type Sequence interface {
	Pair

	// Split returns the split form (First and Rest) of the Sequence
	Split() (ale.Value, Sequence, bool)

	// IsEmpty returns whether this sequence is empty
	IsEmpty() bool
}

Sequence is a series of Values that can be iterated over

type String

type String string

String is the Sequence-compatible representation of string data

func (String) Append added in v0.3.0

func (s String) Append(v ale.Value) Sequence

func (String) Call

func (s String) Call(args ...ale.Value) ale.Value

func (String) Car

func (s String) Car() ale.Value

func (String) Cdr

func (s String) Cdr() ale.Value

func (String) CheckArity

func (s String) CheckArity(argc int) error

func (String) Count

func (s String) Count() int

func (String) ElementAt

func (s String) ElementAt(index int) (ale.Value, bool)

func (String) Equal

func (s String) Equal(other ale.Value) bool

func (String) HashCode

func (s String) HashCode() uint64

func (String) IsEmpty

func (s String) IsEmpty() bool

func (String) Quote

func (s String) Quote() string

Quote quotes and escapes a string

func (String) Reverse

func (s String) Reverse() Sequence

func (String) Split

func (s String) Split() (ale.Value, Sequence, bool)

func (String) String

func (s String) String() string

func (String) Type

func (s String) Type() ale.Type

type Symbol

type Symbol interface {
	ale.Typed

	// Local returns the local part of the symbol
	Local() Local
}

Symbol is an identifier that can be resolved

func MustParseSymbol

func MustParseSymbol(s String) Symbol

MustParseSymbol parses a qualified Local and produces a Symbol or explodes

func NewGeneratedSymbol

func NewGeneratedSymbol(name Local) Symbol

NewGeneratedSymbol creates a generated Symbol

func NewQualifiedSymbol

func NewQualifiedSymbol(name Local, domain Local) Symbol

NewQualifiedSymbol returns a Qualified Symbol for a specific domain

func ParseSymbol

func ParseSymbol(s String) (Symbol, error)

ParseSymbol parses a qualified Local and produces a Symbol

type SymbolGenerator

type SymbolGenerator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SymbolGenerator produces instance-unique local symbols

func NewSymbolGenerator

func NewSymbolGenerator() *SymbolGenerator

NewSymbolGenerator creates a new symbol generator. In general, it is safe to use the global generator because it only maintains an incrementer

func (*SymbolGenerator) Local

func (g *SymbolGenerator) Local(name Local) Local

Local returns a newly generated local symbol

func (*SymbolGenerator) Prefix

func (g *SymbolGenerator) Prefix() string

type TypePredicate

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

func MakeTypePredicate

func MakeTypePredicate(t ale.Type) *TypePredicate

MakeTypePredicate returns a TypePredicate for the given Type

func TypePredicateOf

func TypePredicateOf(f ale.Value, r ...ale.Value) *TypePredicate

TypePredicateOf returns a TypePredicate for the Types of the given Values. If more than one Value is provided, the Union of their Types is returned

func (*TypePredicate) Call

func (t *TypePredicate) Call(args ...ale.Value) ale.Value

func (*TypePredicate) CheckArity

func (t *TypePredicate) CheckArity(argc int) error

func (*TypePredicate) Equal

func (t *TypePredicate) Equal(other ale.Value) bool

func (*TypePredicate) Get

func (t *TypePredicate) Get(key ale.Value) (ale.Value, bool)

func (*TypePredicate) String added in v0.3.0

func (t *TypePredicate) String() string

func (*TypePredicate) Type

func (t *TypePredicate) Type() ale.Type

type Vector

type Vector []ale.Value

Vector is a fixed-length array of Values

func NewVector

func NewVector(vals ...ale.Value) Vector

NewVector creates a new Vector instance

func (Vector) Append

func (v Vector) Append(e ale.Value) Sequence

func (Vector) Call

func (v Vector) Call(args ...ale.Value) ale.Value

func (Vector) Car

func (v Vector) Car() ale.Value

func (Vector) Cdr

func (v Vector) Cdr() ale.Value

func (Vector) CheckArity

func (v Vector) CheckArity(argc int) error

func (Vector) Count

func (v Vector) Count() int

func (Vector) ElementAt

func (v Vector) ElementAt(index int) (ale.Value, bool)

func (Vector) Equal

func (v Vector) Equal(other ale.Value) bool

func (Vector) HashCode

func (v Vector) HashCode() uint64

func (Vector) IndexOf added in v0.3.0

func (v Vector) IndexOf(val ale.Value) (int, bool)

func (Vector) IsEmpty

func (v Vector) IsEmpty() bool

func (Vector) Prepend

func (v Vector) Prepend(e ale.Value) Sequence

func (Vector) Reverse

func (v Vector) Reverse() Sequence

func (Vector) Split

func (v Vector) Split() (ale.Value, Sequence, bool)

func (Vector) String

func (v Vector) String() string

func (Vector) Type

func (v Vector) Type() ale.Type

Directories

Path Synopsis
Package internal provides utility types for the data package
Package internal provides utility types for the data package

Jump to

Keyboard shortcuts

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