Core error messages
const ( ModArgTypeError string = "mod function requires need int/float argument; received incorrect type: " AddArgTypeError string = "add function requires int and/or float64 objects" SubArgTypeError string = "sub function requires need int/float argument" CompareArgsCountError string = "You cannot compare less than two values" IncompatibleCompareTypesError string = "The comparison of types of args provided is not allowed" GetNot2Or3ArgsError string = "The get function needs 2 or 3 arguments %d given." GetArgsTypesError string = "Arguments to the get function must include slice/vector/string" )
func ADD(args ...Any) float64
ADD any number of int or float64 args ALWAYS returns a float64
func DIV()
DIV any number of int or float64 args ALWAYS returns a float64
func EQ(args ...Any) bool
EQ equal
func GT(args ...Any) bool
GT greater-than TODO: can only compare ints and slice lens for now.
func GTEQ(args ...Any) bool
GTEQ greater-than or equal
func IsFloat(n Any) bool
IsFloat boolean check
func IsInt(n Any) bool
IsInt boolean check
func LT(args ...Any) bool
LT less-than TODO: can only compare ints and slice lens for now.
func LTEQ(args ...Any) bool
LTEQ less-than or equal
func MOD(a, b Any) int
MOD modulus operator
func MUL(args ...Any) float64
MUL any number of int or float64 args ALWAYS returns a float64
func SUB(args ...Any) float64
SUB any number of int or float64 args ALWAYS returns a float64
Any is an interface for any ZYLISP type
type Any interface{}
func Get(args ...Any) Any
Get ...
Number type
type Number struct { Value Any }
func AddNumbers(args ...Number) (newNum Number, err error)
AddNumbers adds a series of numbers
func (n Number) IsFloat() bool
IsFloat method on number type
func (n Number) IsInt() bool
IsInt method on number type
func (n Number) ToFloat() float64
ToFloat method on number type
func (n Number) ToInt() int
ToInt method on number type