Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToStr(slice *Slice) string
- func CoerceBool(x lisp.Object) lisp.Object
- func CoerceFloat(x lisp.Object) lisp.Object
- func CoerceInt(x lisp.Object) lisp.Object
- func CoerceString(x lisp.Object) lisp.Object
- func CoerceSymbol(x lisp.Object) lisp.Object
- func IfaceCall0(iface *Iface, fnID int) lisp.Object
- func IfaceCall1(iface *Iface, fnID int, a1 lisp.Object) lisp.Object
- func IfaceCall2(iface *Iface, fnID int, a1, a2 lisp.Object) lisp.Object
- func IfaceCall3(iface *Iface, fnID int, a1, a2, a3 lisp.Object) lisp.Object
- func IfaceCall4(iface *Iface, fnID int, a1, a2, a3, a4 lisp.Object) lisp.Object
- func MakeMap() lisp.Object
- func MakeMapCap(capacity int) lisp.Object
- func MapInsert(key lisp.Object, val lisp.Object, m lisp.Object)
- func MbStringGet(s string, index int) rune
- func Panic(errorData lisp.Object)
- func Print(args lisp.Object)
- func Println(args lisp.Object)
- func SliceCap(slice *Slice) int
- func SliceCopy(dst, src *Slice)
- func SliceCopyFast(dst, src *Slice)
- func SliceGet(slice *Slice, index int) lisp.Object
- func SliceLen(slice *Slice) int
- func SliceSet(slice *Slice, index int, val lisp.Object)
- func StringGet(s string, index int) rune
- func ToBool(o lisp.Object) bool
- type Iface
- type Slice
- func ArraySlice2(arr lisp.Object, low, high int) *Slice
- func ArraySliceHigh(arr lisp.Object, high int) *Slice
- func ArraySliceLow(arr lisp.Object, low int) *Slice
- func ArrayToSlice(data lisp.Object) *Slice
- func MakeSlice(length int, zv lisp.Object) *Slice
- func MakeSliceCap(length, capacity int, zv lisp.Object) *Slice
- func SlicePush(slice *Slice, val lisp.Object) *Slice
- func SliceSlice2(slice *Slice, low, high int) *Slice
- func SliceSliceHigh(slice *Slice, high int) *Slice
- func SliceSliceLow(slice *Slice, low int) *Slice
- func StrToBytes(s string) *Slice
Constants ¶
const MultiRetLimit = 8
MultiRetLimit specifies max N available in RetN variables.
Variables ¶
var ( Ret2 lisp.Object Ret3 lisp.Object Ret4 lisp.Object Ret5 lisp.Object Ret6 lisp.Object Ret7 lisp.Object Ret8 lisp.Object )
RetN variables store Nth return value of the function.
Functions ¶
func BytesToStr ¶
BytesToStr converts slice of bytes to string.
func IfaceCall0 ¶
IfaceCall0 invokes specified function on given interface object.
func IfaceCall1 ¶
IfaceCall1 like IfaceCall0, but for methods with arity=1.
func IfaceCall2 ¶
IfaceCall2 like IfaceCall0, but for methods with arity=2.
func IfaceCall3 ¶
IfaceCall3 like IfaceCall0, but for methods with arity=3.
func IfaceCall4 ¶
IfaceCall4 like IfaceCall0, but for methods with arity=4.
func MakeMapCap ¶
MakeMapCap creates a new map of specified initial size.
func MapInsert ¶
MapInsert is a simple wrapper aroung "puthash" which panics if nil map "m" is used.
func MbStringGet ¶
MbStringGet is a part of StringIndex implementation. Called for multibyte strings.
func SliceCopy ¶
func SliceCopy(dst, src *Slice)
SliceCopy copies one slice contents to another. Up to "min(len(dst), len(src))" elements are copied.
func SliceCopyFast ¶
func SliceCopyFast(dst, src *Slice)
SliceCopyFast is SliceCopy specialization that is appliable if both `dst' and `src' have zero offset.
Types ¶
type Slice ¶
type Slice struct {
// contains filtered or unexported fields
}
Slice - Go slice.
func ArraySlice2 ¶
ArraySlice2 slices an array: "arr[low:high]".
func ArraySliceHigh ¶
ArraySliceHigh slices an array: "arr[:high]".
func ArraySliceLow ¶
ArraySliceLow slices an array: "arr[low:]".
func ArrayToSlice ¶
ArrayToSlice constructs a new slice from given data vector. Vector is not copied.
func MakeSlice ¶
MakeSlice creates a new slice with cap=len. All values initialized to specified zero value.
func MakeSliceCap ¶
MakeSliceCap creates a new slice. Each value within length bounds is initialized to specified zero value.
func SliceSlice2 ¶
SliceSlice2 = "slice[low:high]".
func SliceSliceHigh ¶
SliceSliceHigh = "slice[:high]".
func SliceSliceLow ¶
SliceSliceLow = "slice[low:]".