Documentation ¶
Index ¶
- func Compare(this MalType, that MalType) (int8, error)
- func Equals(this MalType, that MalType) bool
- func Hash(value MalType) uint32
- type Applicable
- type Atom
- type Boolean
- type Concatenation
- func (Concatenation) Applicable()
- func (c Concatenation) Conj(value MalType) (Conjable, error)
- func (c Concatenation) Metadata() Map
- func (c Concatenation) Next() (bool, MalType, Seq)
- func (c Concatenation) Seq() Seq
- func (Concatenation) Sequential()
- func (c Concatenation) WithMetadata(m Map) HasMetadata
- type Conjable
- type ConsCell
- type Counted
- type Env
- type Function
- type HasMetadata
- type HasSimpleValueEquality
- type Indexed
- type Integer
- type Keyword
- type List
- type ListIteratorSeq
- type MalError
- type MalType
- type Map
- type Nil
- type Range
- type Rune
- type Seq
- type Seqable
- type Sequential
- type SliceSeq
- type String
- type Symbol
- type Undefined
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Applicable ¶
type Applicable interface { Sequential Applicable() }
Applicable - a list-y form that applies the rest to the first when evaluated
type Atom ¶
type Atom struct {
Value MalType
}
Atom - mal atom values
func (*Atom) ValueEquals ¶
ValueEquals checks pointer equality
type Boolean ¶
type Boolean bool
Boolean - mal boolean values
func (Boolean) ValueEquals ¶
ValueEquals compares booleans
type Concatenation ¶
Concatenation is not empty
func (Concatenation) Conj ¶
func (c Concatenation) Conj(value MalType) (Conjable, error)
Conj to a concatenation prepends as a cons
func (Concatenation) Next ¶
func (c Concatenation) Next() (bool, MalType, Seq)
Next of a concatention finds the first nonempty value
func (Concatenation) WithMetadata ¶
func (c Concatenation) WithMetadata(m Map) HasMetadata
WithMetadata for a concatenation
type ConsCell ¶
ConsCell - a seq of a head prepended to a tail seq
func (ConsCell) WithMetadata ¶
func (c ConsCell) WithMetadata(m Map) HasMetadata
WithMetadata for a cons
type Counted ¶
type Counted interface {
Count() int
}
Counted - collections that have finite, known size
type Function ¶
type Function struct { Fn func(...MalType) (MalType, error) Body MalType Binds []MalType Env *Env IsMacro bool Meta Map }
Function - functions of values to value
func (Function) WithMetadata ¶
func (fn Function) WithMetadata(m Map) HasMetadata
WithMetadata for a fn
type HasMetadata ¶
type HasMetadata interface { Metadata() Map WithMetadata(m Map) HasMetadata }
HasMetadata - the type has metadata
type HasSimpleValueEquality ¶
type HasSimpleValueEquality interface { ValueEquals(MalType) bool // contains filtered or unexported methods }
HasSimpleValueEquality - is a type which can compare itself to other values
type Integer ¶
type Integer int64
Integer - mal integer values
func (Integer) ValueEquals ¶
ValueEquals compares integers
type Keyword ¶
type Keyword struct {
Name string
}
Keyword - mal keyword values
func (Keyword) ValueEquals ¶
ValueEquals compares keywords
type ListIteratorSeq ¶
ListIteratorSeq seqs over immutable Lists
func (ListIteratorSeq) Next ¶
func (seq ListIteratorSeq) Next() (bool, MalType, Seq)
Next for a list
func (ListIteratorSeq) WithMetadata ¶
func (seq ListIteratorSeq) WithMetadata(m Map) HasMetadata
WithMetadata seqs have metadata
type Nil ¶
type Nil struct{}
Nil - mal nil value
type Range ¶
Range is a seq over integers
type Seq ¶
type Seq interface { // Next returns a tuple of emptiness, the first item if non-empty, and the tail seq Next() (bool, MalType, Seq) }
Seq - a traversal of a sequence
type Seqable ¶
type Seqable interface {
Seq() Seq
}
Seqable - collections that can produce a traversing sequence, or are empty
type Sequential ¶
type Sequential interface { Seqable Sequential() }
Sequential - collections that have an order
type SliceSeq ¶
SliceSeq traverses slices of items
func (SliceSeq) WithMetadata ¶
func (seq SliceSeq) WithMetadata(m Map) HasMetadata
WithMetadata seqs have metadata
type String ¶
type String string
String - mal string values
func (String) ValueEquals ¶
ValueEquals compared strings
type Symbol ¶
Symbol - mal symbol values
func (Symbol) ValueEquals ¶
ValueEquals compares symbols
func (Symbol) WithMetadata ¶
func (symbol Symbol) WithMetadata(m Map) HasMetadata
WithMetadata symbols