runtime

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Nil = instance.Nil
	T   = instance.NewSymbol("T")
)

The values t and nil are called booleans. t denotes true, and nil is the only value denoting false. Predicates, also called boolean functions, are functions that return t when satisfied and nil otherwise. Any object other than nil is treated as true (not just t). When objects are treated as true or nil this way they are called quasi-booleans. t is an identifier naming the symbol t, and nil is an identifier naming the symbol nil (which is also the empty list). nil is the unique instance of the null class. Like boolean functions, the and and or special forms return truth values; however, these truth values are nil when the test is not satisfied and a non-nil value otherwise. The result of and and or are quasi-booleans. t is a named constant whose value is the symbol t itself. nil is a named constant whose value is the symbol nil itself.

View Source
var (
	MostPositiveFloat = instance.NewFloat(math.MaxFloat64)
	MostNegativeFloat = instance.NewFloat(-math.MaxFloat64)
)

The value of MostPositiveFloat is the implementation-dependent floating-point number closest to positive infinity. The value of MostNegativeFloat is the implementation-dependent floating-point number closest to negative infinity.

View Source
var Pi = instance.NewFloat(3.141592653589793)

Pi is an approximation of π.

Functions

func Abs

Abs returns the absolute value of its argument. An error shall be signaled if x is not a number (error-id. domain-error).

func Add

Add returns the sum, respectively, of their arguments. If all arguments are integers, the result is an integer. If any argument is a float, the result is a float. When given no arguments, + returns 0. An error shall be signaled if any x is not a number (error-id. domain-error).

func And

func And(e env.Environment, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

And is the sequential logical “and” (or “∧”). forms are evaluated from left to right until either one of them evaluates to nil or else none are left. If one of them evaluates to nil, then nil is returned from the and; otherwise, the value of the last evaluated form is returned.

func Append

func Append(e env.Environment, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Append returns the result of appending all of the lists, or () if given no lists. An error shall be signaled if any list is not a list (error-id. domain-error). This function does not modify its arguments. It is implementation defined whether and when the result shares structure with its list arguments. An error shall be signaled if the list cannot be allocated (error-id. cannot-create-list).

func Apply

func Apply(e env.Environment, function ilos.Instance, obj ...ilos.Instance) (ilos.Instance, ilos.Instance)

Apply applies function to the arguments, obj*, followed by the elements of list, if any. It returns the value returned by function. An error shall be signaled if function is not a function (error-id. domain-error). Each obj may be any ISLISP object. An error shall be signaled if list is not a proper list (error-id. improper-argument-list).

func Aref

func Aref(e env.Environment, basicArray ilos.Instance, dimensions ...ilos.Instance) (ilos.Instance, ilos.Instance)

Aref returns the object stored in the component of the basic-array specified by the sequence of integers z. This sequence must have exactly as many elements as there are dimensions in the basic-array, and each one must satisfy 0 ≤ zi < di , di the ith dimension and 0 ≤ i < d, d the number of dimensions. Arrays are indexed 0 based, so the ith row is accessed via the index i − 1. An error shall be signaled if basic-array is not a basic-array (error-id. domain-error). An error shall be signaled if any z is not a non-negative integer (error-id. domain-error).

func ArrayDimensions

func ArrayDimensions(e env.Environment, basicArray ilos.Instance) (ilos.Instance, ilos.Instance)

ArrayDimensions returns a list of the dimensions of a given basic-array. An error shall be signaled if basic-array is not a basic-array (error-id. domain-error). The consequences are undefined if the returned list is modified.

func Assoc

func Assoc(e env.Environment, obj, associationList ilos.Instance) (ilos.Instance, ilos.Instance)

Assoc returns the first cons if assocation-list contains at least one cons whose car is obj (as determined by eql). Otherwise, nil is returned. An error shall be signaled if association-list is not a list of conses (error-id. domain-error).

func Atan

Atan returns the arc tangent of x. The result is a (real) number that lies between −π/2 and π/2 (both exclusive). An error shall be signaled if x is not a number (error-id. domain-error).

func Atan2

func Atan2(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

Atan2 returns the phase of its representation in polar coordinates. If x1 is zero and x2 is negative, the result is positive. If x1 and x2 are both zero, the result is implementation defined. An error shall be signaled if x is not a number (error-id. domain-error). The value of atan2 is always between −π (exclusive) and π (inclusive) when minus zero is not supported; when minus zero is supported, the range includes −π. The signs of x1 (indicated as y) and x2 (indicated as x) are used to derive quadrant information.

func Atanh

Atanh returns the hyperbolic arc tangent of x. An error shall be signaled if x is not a number with absolute value less than 1 (error-id. domain-error).

func BasicArrayP

func BasicArrayP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

BasicArrayP returns t if obj is a basic-array (instance of class basic-array); otherwise, returns nil. obj may be any ISLISP object.

func BasicArrayStarP

func BasicArrayStarP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

BasicArrayStarP returns t if obj is a basic-array* (instance of class <basic-array*>); otherwise, returns nil. obj may be any ISLISP object.

func BasicVectorP

func BasicVectorP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

BasicVectorP returns t if obj is a basic-vector (instance of class basic-vector); otherwise, returns nil. obj may be any ISLISP object.

func Block

func Block(e env.Environment, tag ilos.Instance, body ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Car

Car returns the left component of the cons. An error shall be signaled if cons is not a cons (error-id. domain-error).

func Case

func Case(e env.Environment, key ilos.Instance, pattern ...ilos.Instance) (ilos.Instance, ilos.Instance)

Case special form, called case form, provide a mechanism to execute a matching clause from a series of clauses based on the value of a dispatching form keyform. The clause to be executed is identified by a set of keys. A key can be any object. If the keylist of the last clause is t the associated clause is executed if no key matches the keyform. keyform is a form to be computed at the beginning of execution of the case form. If the result of evaluating keyform is equivalent to a key, then the forms, if any, in the corresponding clause are evaluated sequentially and the value of the last one is returned as value of the whole case form. case determines match equivalence by using eql; the value returned by keyform and key. If no form exists for a matching key, the case form evaluates to nil. If the value of keyform is different from every key, and there is a default clause, its forms, if any, are evaluated sequentially, and the value of the last one is the result of the case form.

func CaseUsing

func CaseUsing(e env.Environment, pred, key ilos.Instance, pattern ...ilos.Instance) (ilos.Instance, ilos.Instance)

CaseUsing special form, called case forms, provide a mechanism to execute a matching clause from a series of clauses based on the value of a dispatching form keyform. The clause to be executed is identified by a set of keys. A key can be any object. If the keylist of the last clause is t the associated clause is executed if no key matches the keyform. keyform is a form to be computed at the beginning of execution of the case form. If the result of evaluating keyform is equivalent to a key, then the forms, if any, in the corresponding clause are evaluated sequentially and the value of the last one is returned as value of the whole case form. case-using match determines equivalence by using the result of evaluating predform. predform must be a boolean or quasi-boolean function that accepts two arguments, the value returned by keyform and key. If no form exists for a matching key, the case form evaluates to nil. If the value of keyform is different from every key, and there is a default clause, its forms, if any, are evaluated sequentially, and the value of the last one is the result of the case form.

func Catch

func Catch(e env.Environment, tag ilos.Instance, body ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Cdr

Cdr returns the right component of the cons. An error shall be signaled if cons is not a cons (error-id. domain-error).

func Ceiling

Ceiling Returns the smallest integer that is not smaller than x. That is, x is truncated towards positive infinity. An error shall be signaled if x is not a number (error-id. domain-error).

func Cerror

func Cerror(e env.Environment, continueString, errorString ilos.Instance, objs ...ilos.Instance) (ilos.Instance, ilos.Instance)

func CharEqual

func CharEqual(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharEqual tests whether char1 is the same character as char2.

func CharGreaterThan

func CharGreaterThan(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharGreaterThan tests whether char1 is greater than char2. An error shall be signaled if either char1 or char2 is not a character (error-id. domain-error).

func CharGreaterThanOrEqual

func CharGreaterThanOrEqual(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharGreaterThanOrEqual tests whether char1 is greater than or equal to char2. An error shall be signaled if either char1 or char2 is not a character (error-id. domain-error).

func CharIndex

func CharIndex(e env.Environment, char, str ilos.Instance, startPosition ...ilos.Instance) (ilos.Instance, ilos.Instance)

CharIndex returns the position of char in string, The search starts from the position indicated by start-position (which is 0-based and defaults to 0). The value returned if the search succeeds is an offset from the beginning of the string, not from the starting point. If the char does not occur in the string, nil is returned. The function char= is used for the comparisons. An error shall be signaled if char is not a character or if string is not a string (error-id. domain-error).

func CharLessThan

func CharLessThan(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharLessThan tests whether char1 is less than char2. An error shall be signaled if either char1 or char2 is not a character (error-id. domain-error).

func CharLessThanOrEqual

func CharLessThanOrEqual(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharLessThanOrEqual tests whether char1 is less than or equal to char2. An error shall be signaled if either char1 or char2 is not a character (error-id. domain-error).

func CharNotEqual

func CharNotEqual(e env.Environment, char1, char2 ilos.Instance) (ilos.Instance, ilos.Instance)

CharNotEqual if and only if they are not char=.

func Characterp

func Characterp(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

Characterp returns t if obj is a character (instance of class character); otherwise, returns nil. obj may be any ISLISP object.

func Class

func Class(e env.Environment, className ilos.Instance) (ilos.Class, ilos.Instance)

func ClassOf

func Close

func Close(e env.Environment, stream ilos.Instance) (ilos.Instance, ilos.Instance)

func Cond

func Cond(e env.Environment, testFrom ...ilos.Instance) (ilos.Instance, ilos.Instance)

Cond the clauses (test form*) are scanned sequentially and in each case the test is evaluated; when a test delivers a non-nil value the scanning process stops and all forms associated with the corresponding clauseare sequentially evaluated and the value of the last one is returned. If no test is true, then nil is returned. If no form exists for the successful test then the value of this test is returned.

func ConditionContinuable

func ConditionContinuable(e env.Environment, condition ilos.Instance) (ilos.Instance, ilos.Instance)

func Cons

func Cons(e env.Environment, obj1, obj2 ilos.Instance) (ilos.Instance, ilos.Instance)

Cons builds a cons from two objects, with obj1 as its car (or `left') part and with obj2 as its cdr (or `right') part. An error shall be signaled if the requested cons cannot be allocated (error-id. cannot-create-cons). Both obj1 and obj2 may be any ISLISP object.

func Consp

Consp returns t if obj is a cons (instance of class cons); otherwise, returns nil. obj may be any ISLISP object.

func ContinueCondition

func ContinueCondition(e env.Environment, condition ilos.Instance, value ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Convert

func Convert(e env.Environment, object, class1 ilos.Instance) (ilos.Instance, ilos.Instance)

func Cos

Cos returns the cosine of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func Cosh

Cosh returns the hyperbolic cosine of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func CreateArray

func CreateArray(e env.Environment, dimensions ilos.Instance, initialElement ...ilos.Instance) (ilos.Instance, ilos.Instance)

CreateArray creates an array of the given dimensions. The dimensions argument is a list of non-negative integers. The result is of class general-vector if there is only one dimension, or of class <general-array*> otherwise. If initial-element is given, the elements of the new array are initialized with this object, otherwise the initialization is implementation defined. An error shall be signaled if the requested array cannot be allocated (error-id. cannot-create-array). An error shall be signaled if dimensions is not a proper list of non-negative integers (error-id. domain-error). initial-element may be any ISLISP object

func CreateList

func CreateList(e env.Environment, i ilos.Instance, initialElement ...ilos.Instance) (ilos.Instance, ilos.Instance)

CreateList returns a list of length i. If initial-element is given, the elements of the new list are initialized with this object; otherwise, the initialization is implementation defined. An error shall be signaled if the requested list cannot be allocated (error-id. cannot-create-list). An error shall be signaled if i is not a non-negative integer (error-id. domain-error).initial-element may be any ISLISP object.

func CreateString

func CreateString(e env.Environment, i ilos.Instance, initialElement ...ilos.Instance) (ilos.Instance, ilos.Instance)

CreateString returns a string of length i. If initial-character is given, then the characters of the new string are initialized with this character, otherwise the initialization is implementation defined. An error shall be signaled if the requested string cannot be allocated (error-id. cannot-create-string). An error shall be signaled if i is not a non-negative integer or if initial-character is not a character (error-id. domain-error).

func CreateStringInputStream

func CreateStringInputStream(e env.Environment, str ilos.Instance) (ilos.Instance, ilos.Instance)

func CreateStringOutputStream

func CreateStringOutputStream(e env.Environment) (ilos.Instance, ilos.Instance)

func CreateVector

func CreateVector(e env.Environment, i ilos.Instance, initialElement ...ilos.Instance) (ilos.Instance, ilos.Instance)

CreateVector returns a general-vector of length i. If initial-element is given, the elements of the new vector are initialized with this object, otherwise the initialization is implementation defined. An error shall be signaled if the requested vector cannot be allocated (error-id. cannot-create-vector). An error shall be signaled if i is not a non-negative integer (error-id. domain-error). initial-element may be any ISLISP object.

func Defclass

func Defclass(e env.Environment, className, scNames, slotSpecs ilos.Instance, classOpts ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Defconstant

func Defconstant(e env.Environment, name, form ilos.Instance) (ilos.Instance, ilos.Instance)

Defconstant is used to define a named constant in the variable namespace of the current toplevel scope. The scope of name is the entire current toplevel scope except the body form. Although name is globally constant, a variable binding for name can be ely established by a binding form. The result of the evaluation of form is bound to the variable named by name. The binding and the object created as the result of evaluating the second argument are immutable. The symbol named name is returned.

func Defdynamic

func Defdynamic(e env.Environment, name, form ilos.Instance) (ilos.Instance, ilos.Instance)

Defdynamic is used to define a dynamic variable identifier in the dynamic variable namespace. The scope of name is the entire current toplevel scope except the body form.The symbol named name is returned.

func Defgeneric

func Defgeneric(e env.Environment, funcSpec, lambdaList ilos.Instance, optionsOrMethodDescs ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Defglobal

func Defglobal(e env.Environment, name, form ilos.Instance) (ilos.Instance, ilos.Instance)

Defglobal is used to define an identifier in the variable namespace of the current toplevel scope. The scope of name is the entire current toplevel scope except the body form. form is evaluated to compute an initializing value for the variable named name. Therefore, defglobal is used only for defining variables and not for modifying them. The symbol named name is returned. A lexical variable binding for name can still be ely established by a binding form; in that case, the e binding lexically shadows the outer binding of name defined by defe.

func Defmacro

func Defmacro(e env.Environment, macroName, lambdaList ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

Defmacro defines a named (toplevel) macro. No implicit block with the macro name is established when the macro-expansion function is invoked. macro-name must be an identifier whose scope is the current toplevel scope in which the defmacro form appears. lambda-list is as defined in page 23. The definition point of macro-name is the closing parenthesis of the lambda-list.

func Defmethod

func Defmethod(e env.Environment, arguments ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Defun

func Defun(e env.Environment, functionName, lambdaList ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

Defun defines function-name as an identifier in the function namespace; function-name is bound to a function object equivalent to (lambda lambda-list form*). The scope of function-name is the whole current toplevel scope. Therefore, the definition of a function admits recursion, occurrences of function-name within the form* refer to the function being defined. The binding between function-name and the function object is immutable. defun returns the function name which is the symbol named function-name. The free identifiers in the body form* (i.e., those which are not contained in the lambda list) follow the rules of lexical scoping.

func Div

Div returns the greatest integer less than or equal to the quotient of z1 and z2. An error shall be signaled if z2 is zero (error-id. division-by-zero).

func Dynamic

func Dynamic(e env.Environment, var1 ilos.Instance) (ilos.Instance, ilos.Instance)

Dynamic denotes a reference to the identifier denoting a dynamic variable. This special form is not allowed in the scope of a definition of var which is not done by defdynamic or dynamic-let. During activation, the current dynamic binding of the variable var is returned that was established most recently and is still in effect. An error shall be signaled if such a binding does not exist (error-id. unbound-variable).

func DynamicLet

func DynamicLet(e env.Environment, varForm ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

DynamicLet is used to establish dynamic variable bindings. The first subform (the dynamic-let variable list) is a list of pairs (var form). The scope of an identifier var defined by dynamic-let is the current toplevel scope. The extent of the bindings of each var is the extent of the body of the dynamic-let. The dynamic-let special form establishes dynamic variables for all vars. References to a dynamic variable named by var must be made through the dynamic special form. All the initializing forms are evaluated sequentially from left to right, and then the values are associated with the corresponding vars. Using these additional dynamic bindings and the already existing bindings of visible identifiers, the forms body-form* are evaluated in sequential order. The returned value of dynamic-let is that of the last body-form of the body (or nil if there is none). The bindings are undone when control leaves the prepared dynamic-let special form.

func Elt

func Elt(e env.Environment, sequence, z ilos.Instance) (ilos.Instance, ilos.Instance)

Elt returns the element of sequence that has index z. Indexing is 0-based; i.e., z = 0 designates the first element, Given a sequence and an integer z satisfying 0 ≤ z < (length sequence). An error shall be signaled if z is an integer outside of the mentioned range (error-id. index-out-of-range). An error shall be signaled if sequence is not a basic-vector or a list or if z is not an integer (error-id. domain-error).

func Eq

func Eq(e env.Environment, obj1, obj2 ilos.Instance) (ilos.Instance, ilos.Instance)

Eq tests whether obj1 and obj2 are same identical object. They return t if the objects are the same; otherwise, they return nil. Two objects are the same if there is no operation that could distinguish them (without modifying them), and if modifying one would modify the other the same way.

func Eql

func Eql(e env.Environment, obj1, obj2 ilos.Instance) (ilos.Instance, ilos.Instance)

Eql tests whether obj1 and obj2 are same identical object. They return t if the objects are the same; otherwise, they return nil. Two objects are the same if there is no operation that could distinguish them (without modifying them), and if modifying one would modify the other the same way.

func Equal

func Equal(e env.Environment, obj1, obj2 ilos.Instance) (ilos.Instance, ilos.Instance)

Equal tests whether obj1 and obj2 are isomorphic—i.e., whether obj1 and obj2 denote the same structure with equivalent values. equal returns t if the test was satisfied, and nil if not. Specifically: If obj1 and obj2 are direct instances of the same class, equal returns t if they are eql.

func Error

func Error(e env.Environment, continueString, errorString ilos.Instance, objs ...ilos.Instance) (ilos.Instance, ilos.Instance)

func ErrorOutput

func ErrorOutput(e env.Environment) (ilos.Instance, ilos.Instance)

func Eval

Eval evaluates any classs

func Exp

Exp returns e raised to the power x , where e is the base of the natural logarithm. An error shall be signaled if x is not a number (error-id. domain-error).

func Expt

Expt returns x1 raised to the power x2. The result will be an integer if x1 is an integer and x2 is a non-negative integer. An error shall be signaled if x1 is zero and x2 is negative, or if x1 is zero and x2 is a zero float, or if x1 is negative and x2 is not an integer.

func Flet

func Flet(e env.Environment, functions ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

Flet special form allow the definition of new identifiers in the function namespace for function objects (see Labels).

func Float

Float returns x itself if it is an instance of the class float and returns a floating-point approximation of x otherwise. An error shall be signaled if x is not a number (error-id. domain-error).

func Floatp

Floatp returns t if obj is a float (instance of class float); otherwise, returns nil. The obj may be any ISLISP object.

func Floor

Floor returns the greatest integer less than or equal to x . That is, x is truncated towards negative infinity. An error shall be signaled if x is not a number (error-id. domain-error).

func FlushOutput

func FlushOutput(e env.Environment, stream ilos.Instance) (ilos.Instance, ilos.Instance)

func For

func For(e env.Environment, iterationSpecs, endTestAndResults ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

For repeatedly executes a sequence of forms form*, called its body. It specifies a set of identifiers naming variables that will be e to the for form, their initialization, and their update for each iteration. When a termination condition is met, the iteration exits with a specified result value. The scope of an identifier var is the body, the steps, the end-test , and the result *. A step might be omitted, in which case the effect is the same as if (var init var) had been written instead of (var init). It is a violation if more than one iteration-spec names the same var in the same for form. The for special form is executed as follows: The init forms are evaluated sequentially from left to right. Then each value is used as the initial value of the variable denoted by the corresponding identifier var , and the iteration phase begins. Each iteration begins by evaluating end-test . If the result is nil, the forms in the body are evaluated sequentially (for side-effects). Afterwards, the step-forms are evaluated sequentially order from left to right. Then their values are assigned to the corresponding variables and the next iteration begins. If end-test returns a non-nil value, then the result * are evaluated sequentially and the value of the last one is returned as value of the whole for macro. If no result is present, then the value of the for macro is nil.

func Format

func Format(e env.Environment, stream, formatString ilos.Instance, formatArguments ...ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatChar

func FormatChar(e env.Environment, stream, object ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatFloat

func FormatFloat(e env.Environment, stream, object ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatFreshLine

func FormatFreshLine(e env.Environment, stream ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatInteger

func FormatInteger(e env.Environment, stream, object, radix ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatObject

func FormatObject(e env.Environment, stream, object, escapep ilos.Instance) (ilos.Instance, ilos.Instance)

func FormatTab

func FormatTab(e env.Environment, stream, num ilos.Instance) (ilos.Instance, ilos.Instance)

func Funcall

func Funcall(e env.Environment, function ilos.Instance, obj ...ilos.Instance) (ilos.Instance, ilos.Instance)

Funcall activates the specified function function and returns the value that the function returns. The ith argument (2 ≤ i) of funcall becomes the (i − 1)th argument of the function. An error shall be signaled if function is not a function (error-id. domain-error). Each obj may be any ISLISP object.

func Function

func Function(e env.Environment, fun ilos.Instance) (ilos.Instance, ilos.Instance)

Function returns the function object named by function-name. An error shall be signaled if no binding has been established for the identifier in the function namespace of current lexical eironment (error-id. undefined-function). The consequences are undefined if the function-name names a macro or special form

func Functionp

func Functionp(e env.Environment, fun ilos.Instance) (ilos.Instance, ilos.Instance)

Functionp returns t if obj is a (normal or generic) function; otherwise, returns nil. obj may be any ISLISP object. Function bindings are entities established during execution of a prepared labels or flet forms or by a function-defining form. A function binding is an association between an identifier, function-name, and a function object that is denoted by function-name—if in operator position—or by (function function-name) elsewhere.

func Garef

func Garef(e env.Environment, generalArray ilos.Instance, dimensions ...ilos.Instance) (ilos.Instance, ilos.Instance)

Garef is like aref but an error shall be signaled if its first argument, general-array, is not an object of class general-vector or of class <general-array*> (error-id. domain-error).

func Gcd

Gcd returns the greatest common divisor of its integer arguments. The result is a non-negative integer. For nonzero arguments the greatest common divisor is the largest integer z such that z1 and z2 are integral multiples of z. An error shall be signaled if either z1 or z2 is not an integer (error-id. domain-error).

func GeneralArrayStarP

func GeneralArrayStarP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

GeneralArrayStarP returns t if obj is a general-array* (instance of class <general-array*>); otherwise, returns nil. obj may be any ISLISP object.

func GeneralVectorP

func GeneralVectorP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

GeneralVectorP returns t if obj is a general-vector (instance of class general-vector); otherwise, returns nil. obj may be any ISLISP object.

func Gensym

Gensym returns an unnamed symbol. gensym is useful for writing macros. It is impossible for an identifier to name an unnamed symbol.

func GetOutputStreamString

func GetOutputStreamString(e env.Environment, stream ilos.Instance) (ilos.Instance, ilos.Instance)

func If

func If(e env.Environment, testForm, thenForm ilos.Instance, elseForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

If is conditional expression. The test-form is evaluated. If its result is anything non-nil, the then-form is evaluated and its value is returned; otherwise (if the test-form returned nil), the else-form is evaluated and its value is returned. If no else-form is provided, it defaults to nil.

func IgnoreError

func IgnoreError(e env.Environment, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func InitializeObject

func InitializeObject(e env.Environment, object ilos.Instance, inits ...ilos.Instance) (ilos.Instance, ilos.Instance)

func InputStreamP

func InputStreamP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

func Instancep

func Instancep(e env.Environment, obj ilos.Instance, class ilos.Class) (ilos.Instance, ilos.Instance)

func Integerp

func Integerp(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

Integerp returns t if obj is an integer (instance of class integer); otherwise, returns nil. obj may be any ISLISP object.

func Isqrt

Isqrt Returns the greatest integer less than or equal to the exact positive square root of z . An error shall be signaled if z is not a non-negative integer (error-id. domain-error).

func Labels

func Labels(e env.Environment, functions ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

Labels special form allow the definition of new identifiers in the function namespace for function objects. In a labels special form the scope of an identifier function-name is the whole labels special form (excluding nested scopes, if any); for the flet special form, the scope of an identifier is only the body-form*. Within these scopes, each function-name is bound to a function object whose behavior is equivalent to (lambda lambda-list form*), where free identifier references are resolved as follows: For a labels form, such free references are resolved in the lexical eironment that was active immediately outside the labels form augmented by the function bindings for the given function-names (i.e., any reference to a function function-name refers to a binding created by the labels). For a flet form, free identifier references in the lambda-expression are resolved in the lexical eironment that was active immediately outside the flet form (i.e., any reference to a function function-name are not visible). During activation, the prepared labels or flet establishes function bindings and then evaluates each body-form in the body sequentially; the value of the last one (or nil if there is none) is the value returned by the special form activation. No function-name may appear more than once in the function bindings.

func Lambda

func Lambda(e env.Environment, lambdaList ilos.Instance, form ...ilos.Instance) (ilos.Instance, ilos.Instance)

Lambda special form creates a function object. The scope of the identifiers of the lambda-list is the sequence of forms form*, collectively referred to as the body. When the prepared function is activated later (even if transported as object to some other activation) with some arguments, the body of the function is evaluated as if it was at the same textual position where the lambda special form is located, but in a context where the lambda variables are bound in the variable namespace with the values of the corresponding arguments. A &rest or :rest variable, if any, is bound to the list of the values of the remaining arguments. An error shall be signaled if the number of arguments received is incompatible with the specified lambda-list (error-id. arity-error). Once the lambda variables have been bound, the body is executed. If the body is empty, nil is returned otherwise the result of the evaluation of the last form of body is returned if the body was not left by a non-e exit. If the function receives a &rest or :rest parameter R, the list L1 to which that parameter is bound has indefinite extent. L1 is newly allocated unless the function was called with apply and R corresponds to the final argument, L2 , to that call to apply (or some subtail of L2), in which case it is implementation defined whether L1 shares structure with L2 .

func Lcm

Lcm returns the least common multiple of its integer arguments. An error shall be signaled if either z1 or z2 is not an integer (error-id. domain-error).

func Length

func Length(e env.Environment, sequence ilos.Instance) (ilos.Instance, ilos.Instance)

Length returns the length of sequence as an integer greater than or equal to 0. When sequence is a basic-vector, length returns its dimension. When sequence is a list, the result is the number of elements in the list; if an element is itself a list, the elements within this sublist are not counted. In the case of dotted lists, length returns the number of conses at the uppermost level of the list. For example, (length ' (a b . c)) ⇒ 2, since '(a b . c) ≡ (cons 'a (cons 'b 'c)). An error shall be signaled if sequence is not a basic-vector or a list (error-id. domain-error).

func Let

func Let(e env.Environment, varForm ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

Let is used to define a scope for a group of identifiers for a sequence of forms body-form* (collectively referred to as the body). The list of pairs (var form)* is called the let variable list. The scope of the identifier var is the body. The forms are evaluated sequentially from left to right; then each variable denoted by the identifier var is initialized to the corresponding value. Using these bindings along with the already existing bindings of visible identifiers the body-forms are evaluated. The returned value of let is the result of the evaluation of the last body-form of its body (or nil if there is none). No var may appear more than once in let variable list.

func LetStar

func LetStar(e env.Environment, varForm ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

LetStar form is used to define a scope for a group of identifiers for a sequence of forms body-form* (collectively referred to as the body). The first subform (the let* variable list) is a list of pairs (var form). The scope of an identifier var is the body along with all form forms following the pair (var form) in the let* variable list. For each pair (var form) the following is done: form is evaluated in the context of the bindings in effect at that point in the evaluation. The result of the evaluation is bound to its associated variable named by the identifier var . These variable bindings enlarge the set of current valid identifiers perhaps shadowing previous variable bindings (in case some var was defined outside), and in this enlarged or modified eironment the body-forms are executed. The returned value of let* is the result of the evaluation of the last form of its body (or nil if there is none).

func List

func List(e env.Environment, objs ...ilos.Instance) (ilos.Instance, ilos.Instance)

List returns a new list whose length is the number of arguments and whose elements are the arguments in the same order as in the list-form. An error shall be signaled if the requested list cannot be allocated (error-id. cannot-create-list). Each obj may be any ISLISP object.

func Listp

Listp returns t if obj is a list (instance of class list); otherwise, returns nil. obj may be any ISLISP object.

func Log

Log returns the natural logarithm of x. An error shall be signaled if x is not a positive number (error-id. domain-error).

func MapInto

func MapInto(e env.Environment, destination, function ilos.Instance, sequences ...ilos.Instance) (ilos.Instance, ilos.Instance)

Destructively modifies destination to contain the results of applying function to successive elements in the sequences. The destination is returned. If destination and each element of sequences are not all the same length, the iteration terminates when the shortest sequence (of any of the sequences or the destination) is exhausted. The calls to function proceed from left to right, so that if function has side-effects, it can rely upon being called first on all of the elements with index 0, then on all of those numbered 1, and so on. An error shall be signaled if destination is not a basic-vector or a list (error-id. domain-error). An error shall be signaled if any sequence is not a basic-vector or a list (error-id. domain-error).

func Mapc

func Mapc(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Mapc is like mapcar except that the results of applying function are not accumulated; list1 is returned.

func Mapcan

func Mapcan(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Mapcan is like mapcar respectively, except that the results of applying function are combined into a list by the use of an operation that performs a destructive form of append rather than list.

func Mapcar

func Mapcar(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Mapcar operates on successive elements of the lists. function is applied to the first element of each list, then to the second element of each list, and so on. The iteration terminates when the shortest list runs out, and excess elements in other lists are ignored. The value returned by mapcar is a list of the results of successive calls to function.

func Mapcon

func Mapcon(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Mapcon is like maplist respectively, except that the results of applying function are combined into a list by the use of an operation that performs a destructive form of append rather than list.

func Mapl

func Mapl(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Mapl is like maplist except that the results of applying function are not accumulated; list1 is returned.

func Maplist

func Maplist(e env.Environment, function, list1 ilos.Instance, lists ...ilos.Instance) (ilos.Instance, ilos.Instance)

Maplist is like mapcar except that function is applied to successive sublists of the lists. function is first applied to the lists themselves, and then to the cdr of each list, and then to the cdr of the cdr of each list, and so on.

func Max

Max returns the greatest (closest to positive infinity) of its arguments. The comparison is done by >. An error shall be signaled if any x is not a number (error-id. domain-error).

func Member

func Member(e env.Environment, obj, list ilos.Instance) (ilos.Instance, ilos.Instance)

Member returnes the first sublist of list whose car is obj if list contains at least one occurrence of obj (as determined by eql). Otherwise, nil is returned. An error shall be signaled if list is not a list (error-id. domain-error).

func Min

Min returns the least (closest to negative infinity) of its arguments. The comparison is done by <. An error shall be signaled if any x is not a number (error-id. domain-error).

func Mod

Mod returns the remainder of the integer division of z1 by z2. The sign of the result is the sign of z2. The result lies between 0 (inclusive) and z2 (exclusive), and the difference of z1 and this result is divisible by z2 without remainder. An error shall be signaled if either z1 or z2 is not an integer (error-id. domain-error).

func Multiply

func Multiply(e env.Environment, x ...ilos.Instance) (ilos.Instance, ilos.Instance)

Multiply returns the product, respectively, of their arguments. If all arguments are integers, the result is an integer. If any argument is a float, the result is a float. When given no arguments, Multiply returns 1. An error shall be signaled if any x is not a number (error-id. domain-error).

func Not

Not is the logical “not” (or “¬”). It returns t if obj is nil and nil otherwise. obj may be any ISLISP object.

func Nreverse

func Nreverse(e env.Environment, list ilos.Instance) (ilos.Instance, ilos.Instance)

Nreverse returns a list whose elements are those of the given list, but in reverse order. An error shall be signaled if list is not a list (error-id. domain-error). For nreverse, the conses which make up the top level of the given list are permitted, but not required, to be side-effected in order to produce this new list. nreverse should never be called on a literal object.

func Null

Null returns t if obj is nil; otherwise, returns nil obj may be any ISLISP object.

func NumberEqual

func NumberEqual(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberEqual returns t if x1 has the same mathematical value as x2 ; otherwise, returns nil. An error shall be signaled if either x1 or x2 is not a number (error-id. domain-error). Note: = differs from eql because = compares only the mathematical values of its arguments, whereas eql also compares the representations

func NumberGreaterThan

func NumberGreaterThan(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberGreaterThan returns t if x1 is greater than x2

func NumberGreaterThanOrEqual

func NumberGreaterThanOrEqual(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberGreaterThanOrEqual returns t if x1 is greater than or = x2

func NumberLessThan

func NumberLessThan(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberLessThan returns t if x1 is less than x2

func NumberLessThanOrEqual

func NumberLessThanOrEqual(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberLessThanOrEqual returns t if x1 is less than or = x2

func NumberNotEqual

func NumberNotEqual(e env.Environment, x1, x2 ilos.Instance) (ilos.Instance, ilos.Instance)

NumberNotEqual returns t if x1 and x2 have mathematically distinct values; otherwise, returns nil. An error shall be signaled if either x1 or x2 is not a number (error-id. domain-error).

func Numberp

Numberp returns t if obj is a number (instance of class number); otherwise, returns nil. The obj may be any ISLISP object.

func OpenInputFile

func OpenInputFile(e env.Environment, filename ilos.Instance, elementClass ...ilos.Instance) (ilos.Instance, ilos.Instance)

func OpenIoFile

func OpenIoFile(e env.Environment, filename ilos.Instance, elementClass ...ilos.Instance) (ilos.Instance, ilos.Instance)

func OpenOutputFile

func OpenOutputFile(e env.Environment, filename ilos.Instance, elementClass ...ilos.Instance) (ilos.Instance, ilos.Instance)

func OpenStreamP

func OpenStreamP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

func Or

Or is the sequential logical "or" (or "∨"). forms are evaluated from left to right until either one of them evaluates to a non-nil value or else none are left. If one of them evaluates to a non-nil value, then this non-nil value is returned, otherwise nil is returned.

func OutputStreamP

func OutputStreamP(e env.Environment, obj ilos.Instance) (ilos.Instance, ilos.Instance)

func ParseNumber

func ParseNumber(e env.Environment, str ilos.Instance) (ilos.Instance, ilos.Instance)

ParseNumber scans (as if by read) and if the resulting lexeme is the textual representation of a number, the number it represents is returned. An error shall be signaled if string is not a string (error-id. domain-error). An error shall be signaled if string is not the textual representation of a number (error-id. cannot-parse-number).

func Progn

func Progn(e env.Environment, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

Progn allows a series of forms to be evaluated, where normally only one could be used. The result of evaluation of the last form of form* is returned. All the forms are evaluated from left to right. The values of all the forms but the last are discarded, so they are executed only for their side-effects. progn without forms returns nil.

func Property

func Property(e env.Environment, symbol, propertyName ilos.Instance, obj ...ilos.Instance) (ilos.Instance, ilos.Instance)

Property returns the value of the property named property-name associated with the symbol symbol . If symbol has no property named property-name, obj (which defaults to nil) is returned. An error shall be signaled if either symbol or property-name is not a symbol (error-id. domain-error). obj may be any ISLISP object

func Quasiquote

func Quasiquote(e env.Environment, form ilos.Instance) (ilos.Instance, ilos.Instance)

Quasiquote ` or quasiquote constructs a list structure. quasiquote, like quote, returns its argument unevaluated if no commas or the syntax , (unquote) or ,@ (unquote-splicing) appear within the form. , (unquote) syntax is valid only within ` (quasiquote) expressions. When appearing within a quasiquote the form is evaluated and its result is inserted into the quasiquote structure instead of the unquote form. ,@ (unquote-splicing) is also syntax valid only within ` expressions. When appearing within a quasiquote the expression form must evaluate to a list. The elements of the list are spliced into the enclosing list in place of the unquote-splicing form sequence. Quasiquote forms may be nested. Substitutions are made only for unquoted expressions appearing at the same nesting level, which increases by one inside each successive quasiquotation and decreases by one inside each unquotation.

func Quote

Quote is used to include any object in an ISLisp text. A quoted expression denotes a reference to an object.

func Quotient

func Quotient(e env.Environment, dividend, divisor1 ilos.Instance, divisor ...ilos.Instance) (ilos.Instance, ilos.Instance)

Quotient returns the quotient of those numbers. The result is an integer if dividend and divisor are integers and divisor evenly divides dividend , otherwise it will be a float. Given more than two arguments, quotient operates iteratively on each of the divisor1 … divisorn as in dividend /divisor1 / … /divisorn. The type of the result follows from the two-argument case because the three-or-more-argument quotient can be defined as follows: An error shall be signaled if dividend is not a number (error-id. domain-error). An error shall be signaled if any divisor is not a number (error-id. domain-error). An error shall be signaled if any divisor is zero (error-id. division-by-zero).

func Read

func Read(e env.Environment, options ...ilos.Instance) (ilos.Instance, ilos.Instance)

func ReadChar

func ReadChar(e env.Environment, options ...ilos.Instance) (ilos.Instance, ilos.Instance)

func ReadLine

func ReadLine(e env.Environment, options ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Reciprocal

func Reciprocal(e env.Environment, x ilos.Instance) (ilos.Instance, ilos.Instance)

Reciprocal returns the reciprocal of its argument x ; that is, 1/x . An error shall be signaled if x is zero (error-id. division-by-zero).

func RemoveProperty

func RemoveProperty(e env.Environment, symbol, propertyName ilos.Instance) (ilos.Instance, ilos.Instance)

RemoveProperty removes the property property-name associated with symbol and returns the property value of the removed property if there is such a property. If there is no such property, nil is returned. An error shall be signaled if either symbol or property-name is not a symbol (error-id. domain-error).

func ReportCondition

func ReportCondition(e env.Environment, condition, stream ilos.Instance) (ilos.Instance, ilos.Instance)

func ReturnFrom

func ReturnFrom(e env.Environment, tag, object ilos.Instance) (ilos.Instance, ilos.Instance)

func Reverse

func Reverse(e env.Environment, list ilos.Instance) (ilos.Instance, ilos.Instance)

Reverse returns a list whose elements are those of the given list, but in reverse order. An error shall be signaled if list is not a list (error-id. domain-error). For reverse, no side-effect to the given list occurs. The resulting list is permitted but not required to share structure with the input list.

func Round

Round returns the integer nearest to x. If x is exactly halfway between two integers, the even one is chosen. An error shall be signaled if x is not a number (error-id. domain-error).

func SetAref

func SetAref(e env.Environment, obj, basicArray ilos.Instance, dimensions ...ilos.Instance) (ilos.Instance, ilos.Instance)

SetAref replaces the object obtainable by aref or garef with obj . The returned value is obj. The constraints on the basic-array, the general-array, and the sequence of indices z is the same as for aref and garef.

func SetCar

func SetCar(e env.Environment, obj, cons ilos.Instance) (ilos.Instance, ilos.Instance)

SetCar updates the left component of cons with obj. The returned value is obj . An error shall be signaled if cons is not a cons (error-id. domain-error). obj may be any ISLISP object.

func SetCdr

func SetCdr(e env.Environment, obj, cons ilos.Instance) (ilos.Instance, ilos.Instance)

SetCdr updates the right component of cons with obj. The returned value is obj . An error shall be signaled if cons is not a cons (error-id. domain-error). obj may be any ISLISP object.

func SetDynamic

func SetDynamic(e env.Environment, form, var1 ilos.Instance) (ilos.Instance, ilos.Instance)

SetDynamic denotes an assignment to a dynamic variable. This form can appear anywhere that (dynamic var) can appear. form is evaluated and the result of the evaluation is used to change the dynamic binding of var. An error shall be signaled if var has no dynamic value (error-id. unbound-variable). setf of dynamic can be used only for modifying bindings, and not for establishing them.

func SetElt

func SetElt(e env.Environment, obj, sequence, z ilos.Instance) (ilos.Instance, ilos.Instance)

SetElt is that these replace the object obtainable by elt with obj. The returned value is obj. An error shall be signaled if z is an integer outside of the valid range of indices (error-id. index-out-of-range). An error shall be signaled if sequence is not a basic-vector or a list or if z is not an integer (error-id. domain-error). obj may be any ISLISP object.

func SetGaref

func SetGaref(e env.Environment, obj, generalArray ilos.Instance, dimensions ...ilos.Instance) (ilos.Instance, ilos.Instance)

SetGaref replaces the object obtainable by aref or garef with obj . The returned value is obj. The constraints on the basic-array, the general-array, and the sequence of indices z is the same as for aref and garef.

func SetProperty

func SetProperty(e env.Environment, obj, symbol, propertyName ilos.Instance) (ilos.Instance, ilos.Instance)

SetProperty causes obj to be the new value of the property named property-name asssociated with the symbol symbol . If the property named property-name already exists, its corresponding property value is replaced; otherwise, a new property is created. obj is returned. An error shall be signaled if either symbol or property-name is not a symbol (error-id. domain-error). obj may be any ISLISP object

func Setf

func Setf(e env.Environment, var1, form ilos.Instance) (ilos.Instance, ilos.Instance)

func Setq

func Setq(e env.Environment, var1, form ilos.Instance) (ilos.Instance, ilos.Instance)

Setq represents an assignment to the variable denoted by the identifier. In consequence, the identifier may designate a different object than before, the value of form. The result of the evaluation of form is returned. This result is used to modify the variable binding denoted by the identifier var (if it is mutable). setq can be used only for modifying bindings, and not for establishing a variable. The setq special form must be contained in the scope of var , established by defglobal, let, let*, for, or a lambda expression.

func SignalCondition

func SignalCondition(e env.Environment, condition, continuable ilos.Instance) (ilos.Instance, ilos.Instance)

func Sin

Sin returns the sine of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func Sinh

Sinh returns the hyperbolic sine of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func Sqrt

Sqrt returns the non-negative square root of x. An error shall be signaled if x is not a non-negative number (error-id. domain-error).

func StandardInput

func StandardInput(e env.Environment) (ilos.Instance, ilos.Instance)

func StandardOutput

func StandardOutput(e env.Environment) (ilos.Instance, ilos.Instance)

func StreamReadyP

func StreamReadyP(e env.Environment, inputStream ilos.Instance) (ilos.Instance, ilos.Instance)

func Streamp

func StringAppend

func StringAppend(e env.Environment, str ...ilos.Instance) (ilos.Instance, ilos.Instance)

StringAppend returns a single string containing a sequence of characters that results from appending the sequences of characters of each of the strings, or "" if given no strings. An error shall be signaled if any string is not a string (error-id. domain-error). This function does not modify its arguments. It is implementation defined whether and when the result shares structure with its string arguments. An error shall be signaled if the string cannot be allocated (error-id. cannot-create-string).

func StringEqual

func StringEqual(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringEqual tests whether string1 is the same string as string2.

func StringGreaterThan

func StringGreaterThan(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringGreaterThan tests whether string1 is greater than string2.

func StringGreaterThanOrEqual

func StringGreaterThanOrEqual(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringGreaterThanOrEqual tests whether string1 is greater than or equal to string2.

func StringIndex

func StringIndex(e env.Environment, sub, str ilos.Instance, startPosition ...ilos.Instance) (ilos.Instance, ilos.Instance)

StringIndex returns the position of the given substring within string. The search starts from the position indicated by start-position (which is 0-based and defaults to 0). The value returned if the search succeeds is an offset from the beginning of the string, not from the starting point. If that substring does not occur in the string, nil is returned. Presence of the substring is done by sequential use of char= on corresponding elements of the two strings. An error shall be signaled if either substring or string is not a string (error-id. domain-error).

func StringLessThan

func StringLessThan(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringLessThan tests whether string1 is less than string2.

func StringLessThanOrEqual

func StringLessThanOrEqual(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringLessThanOrEqual tests whether string1 is less than or equal to string2.

func StringNotEqual

func StringNotEqual(e env.Environment, string1, string2 ilos.Instance) (ilos.Instance, ilos.Instance)

StringNotEqual tests whether string1 not is the same string as string2.

func Stringp

Stringp returns t if obj is a string (instance of class string); otherwise, returns nil. obj may be any ISLISP object.

func Subclassp

func Subclassp(e env.Environment, class1, class2 ilos.Class) (ilos.Instance, ilos.Instance)

func Subseq

func Subseq(e env.Environment, sequence, z1, z2 ilos.Instance) (ilos.Instance, ilos.Instance)

Subseq returns the subsequence of length z2 − z1, containing the elements with indices from z1 (inclusive) to z2 (exclusive). The subsequence is newly allocated, and has the same class as sequence, Given a sequence sequence and two integers z1 and z2 satisfying 0 ≤ z1 ≤ z2 ≤ (length sequence) An error shall be signaled if the requested subsequence cannot be allocated (error-id. cannot-create-sequence). An error shall be signaled if z1 or z2 are outside of the bounds mentioned (error-id. index-out-of-range). An error shall be signaled if sequence is not a basic-vector or a list, or if z1 is not an integer, or if z2 is not an integer (error-id. domain-error).

func Substruct

func Substruct(e env.Environment, x ilos.Instance, xs ...ilos.Instance) (ilos.Instance, ilos.Instance)

Substruct returns its additive inverse. An error shall be signaled if x is not a number (error-id. domain-error). If an implementation supports a -0.0 that is distinct from 0.0, then (- 0.0) returns -0.0; in implementations where -0.0 and 0.0 are not distinct, (- 0.0) returns 0.0. Given more than one argument, x1 … xn , - returns their successive differences, x1 −x2 − … −xn. An error shall be signaled if any x is not a number (error-id. domain-error).

func Symbolp

Symbolp returns t if obj is a symbol (instance of class symbol); otherwise, returns nil. The obj may be any ISLISP object.

func Tagbody

func Tagbody(e env.Environment, body ...ilos.Instance) (ilos.Instance, ilos.Instance)

func Tan

Tan returns the tangent of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func Tanh

Tanh returns the hyperbolic tangent of x . x must be given in radians. An error shall be signaled if x is not a number (error-id. domain-error).

func Throw

func Throw(e env.Environment, tag, object ilos.Instance) (ilos.Instance, ilos.Instance)

func TopLevelHander

func TopLevelHander(e env.Environment, c ilos.Instance) (ilos.Instance, ilos.Instance)

func Truncate

Truncate returns the integer between 0 and x (inclusive) that is nearest to x. That is, x is truncated towards zero. An error shall be signaled if x is not a number (error-id. domain-error).

func UnwindProtect

func UnwindProtect(e env.Environment, form ilos.Instance, cleanupForms ...ilos.Instance) (ilos.Instance, ilos.Instance)

UnwindProtect first evaluates form. Evaluation of the cleanup-forms always occurs, regardless of whether the exit is normal or non-e. If the form exits normally yielding a value R, then if all of the cleanup-forms exit normally the value R is returned by the unwind-protect form. If a non-e exit from form occurs, then the cleanup-forms are executed as part of that exit, and then if all of the cleanup-forms exit normally the original non-e exit continues. The cleanup-forms are evaluated from left to right, discarding the resulting values. If execution of the cleanup-forms finishes normally, exit from the unwind-protect form proceeds as described above. It is permissible for a cleanup-form to contain a non-e exit from the unwind-protect form, subject to the following constraint: An error shall be signaled if during execution of the cleanup-forms of an unwind-protect form, a non-e exit is executed to a destination which has been marked as invalid due to some other non-e exit that is already in progress (error-id. control-error). Note: Because ISLISP does not specify an interactive debugger, it is unspecified whether or how error recovery can occur interactively if programmatic handling fails. The intent is that if the ISLISP processor does not terminate abnormally, normal mechanisms for non-e exit (return-from, throw, or go) would be used as necessary and would respect these cleanup-forms.

func Vector

func Vector(e env.Environment, obj ...ilos.Instance) (ilos.Instance, ilos.Instance)

Vector returns a new general-vector whose elements are its obj arguments. The length of the newly created vector is, therefore, the number of objs passed as arguments. The vector is indexed by integers ranging from 0 to dimension−1. An error shall be signaled if the requested vector cannot be allocated (error-id. cannot-create-vector). Each obj may be any ISLISP object.

func While

func While(e env.Environment, testForm ilos.Instance, bodyForm ...ilos.Instance) (ilos.Instance, ilos.Instance)

While the test-form returns a true value. Specifically: 1. test-form is evaluated, producing a value Vt. 2. If Vt is nil, then the while form immediately returns nil. 3. Otherwise, if Vt is non-nil, the forms body-form* are evaluated sequentially (from left to right). 4. Upon successful completion of the body-forms*, the while form begins again with step 1.

func WithErrorOutput

func WithErrorOutput(e env.Environment, streamForm ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithHandler

func WithHandler(e env.Environment, handler ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithOpenInputFile

func WithOpenInputFile(e env.Environment, fileSpec ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithOpenIoFile

func WithOpenIoFile(e env.Environment, fileSpec ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithOpenOutputFile

func WithOpenOutputFile(e env.Environment, fileSpec ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithStandardInput

func WithStandardInput(e env.Environment, streamForm ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

func WithStandardOutput

func WithStandardOutput(e env.Environment, streamForm ilos.Instance, forms ...ilos.Instance) (ilos.Instance, ilos.Instance)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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