alexandria
Alexandria is a collection of portable public domain utilities.
ALEXANDRIA.0.DEV

Macro
DEFINECONSTANT
(name initialvalue &key (test ''eql) documentation)Ensures that the global variable named by NAME is a constant with a value that is equal under TEST to the result of evaluating INITIALVALUE. TEST is a /function designator/ that defaults to EQL. If DOCUMENTATION is given, it becomes the documentation string of the constant. Signals an error if NAME is already a bound nonconstant variable. Signals an error if NAME is already a constant variable whose value is not equal under TEST to result of evaluating INITIALVALUE. 
Macro
IFLET
(bindings &body (thenform &optional elseform))Creates new variable bindings, and conditionally executes either THENFORM or ELSEFORM. ELSEFORM defaults to NIL. BINDINGS must be either single binding of the form: (variable initialform) or a list of bindings of the form: ((variable1 initialform1) (variable2 initialform2) ... (variablen initialformn)) All initialforms are executed sequentially in the specified order. Then all the variables are bound to the corresponding values. If all variables were bound to true values, the THENFORM is executed with the bindings in effect, otherwise the ELSEFORM is executed with the bindings in effect. 
Macro
WHENLET
(bindings &body forms)Creates new variable bindings, and conditionally executes FORMS. BINDINGS must be either single binding of the form: (variable initialform) or a list of bindings of the form: ((variable1 initialform1) (variable2 initialform2) ... (variablen initialformn)) All initialforms are executed sequentially in the specified order. Then all the variables are bound to the corresponding values. If all variables were bound to true values, then FORMS are executed as an implicit PROGN. 
Macro
WHENLET*
(bindings &body forms)Creates new variable bindings, and conditionally executes FORMS. BINDINGS must be either single binding of the form: (variable initialform) or a list of bindings of the form: ((variable1 initialform1) (variable2 initialform2) ... (variablen initialformn)) Each initialform is executed in turn, and the variable bound to the corresponding value. Initialform expressions can refer to variables previously bound by the WHENLET*. Execution of WHENLET* stops immediately if any initialform evaluates to NIL. If all initialforms evaluate to true, then FORMS are executed as an implicit PROGN. 
Type
STRINGDESIGNATOR
A string designator type. A string designator is either a string, a symbol, or a character. 
Function
REQUIREDARGUMENT
(&optional name)Signals an error for a missing argument of NAME. Intended for use as an initialization form for structure and classslots, and a default value for required keyword arguments. 
Condition
SIMPLESTYLEWARNING
(SIMPLEWARNING
,STYLEWARNING
) 
Function
SIMPLESTYLEWARNING
(message &rest args) 
Condition
SIMPLEREADERERROR
(SIMPLEREADERERROR
) 
Function
SIMPLEREADERERROR
(stream message &rest args) 
Condition
SIMPLEPARSEERROR
(SIMPLEERROR
,PARSEERROR
) 
Function
SIMPLEPARSEERROR
(message &rest args) 
Condition
SIMPLEPROGRAMERROR
(SIMPLEERROR
,PROGRAMERROR
) 
Function
SIMPLEPROGRAMERROR
(message &rest args) 
Macro
IGNORESOMECONDITIONS
((&rest conditions) &body body)Similar to CL:IGNOREERRORS but the (unevaluated) CONDITIONS list determines which specific conditions are to be ignored. 
Macro
UNWINDPROTECTCASE
((&optional abortflag) protectedform &body clauses)Like CL:UNWINDPROTECT, but you can specify the circumstances that the cleanup CLAUSES are run. clauses ::= (:NORMAL form*)*  (:ABORT form*)*  (:ALWAYS form*)* Clauses can be given in any order, and more than one clause can be given for each circumstance. The clauses whose denoted circumstance occured, are executed in the order the clauses appear. ABORTFLAG is the name of a variable that will be bound to T in CLAUSES if the PROTECTEDFORM aborted preemptively, and to NIL otherwise. Examples: (unwindprotectcase () (protectedform) (:normal (format t "This is only evaluated if PROTECTEDFORM executed normally.~%")) (:abort (format t "This is only evaluated if PROTECTEDFORM aborted preemptively.~%")) (:always (format t "This is evaluated in either case.~%"))) (unwindprotectcase (abortedp) (protectedform) (:always (performcleanupif abortedp))) 
Macro
WITHINPUTFROMFILE
((streamname filename &rest args &key (direction nil directionp) &allowotherkeys) &body body)Evaluate BODY with STREAMNAME to an input stream on the file FILENAME. ARGS is sent as is to the call to OPEN except EXTERNALFORMAT, which is only sent to WITHOPENFILE when it's not NIL. 
Macro
WITHOUTPUTTOFILE
((streamname filename &rest args &key (direction nil directionp) &allowotherkeys) &body body)Evaluate BODY with STREAMNAME to an output stream on the file FILENAME. ARGS is sent as is to the call to OPEN except EXTERNALFORMAT, which is only sent to WITHOPENFILE when it's not NIL. 
Function
READSTREAMCONTENTINTOSTRING
(stream &key (buffersize 4096))Return the "content" of STREAM as a fresh string. 
Function
READFILEINTOSTRING
(pathname &key (buffersize 4096) externalformat)Return the contents of the file denoted by PATHNAME as a fresh string. The EXTERNALFORMAT parameter will be passed directly to WITHOPENFILE unless it's NIL, which means the system default. 
Function
WRITESTRINGINTOFILE
(string pathname &key (ifexists :error) ifdoesnotexist externalformat)Write STRING to PATHNAME. The EXTERNALFORMAT parameter will be passed directly to WITHOPENFILE unless it's NIL, which means the system default. 
Function
READSTREAMCONTENTINTOBYTEVECTOR
(stream &key ((%length length)) (initialsize 4096))Return "content" of STREAM as freshly allocated (unsignedbyte 8) vector. 
Function
READFILEINTOBYTEVECTOR
(pathname)Read PATHNAME into a freshly allocated (unsignedbyte 8) vector. 
Function
WRITEBYTEVECTORINTOFILE
(bytes pathname &key (ifexists :error) ifdoesnotexist)Write BYTES to PATHNAME. 
Function
COPYFILE
(from to &key (iftoexists :supersede) (elementtype '(unsignedbyte 8)) finishoutput) 
Function
COPYSTREAM
(input output &key (elementtype (streamelementtype input)) (buffersize 4096) (buffer (makearray buffersize :elementtype elementtype)) (start 0) end finishoutput)Reads data from INPUT and writes it to OUTPUT. Both INPUT and OUTPUT must be streams, they will be passed to READSEQUENCE and WRITESEQUENCE and must have compatible elementtypes. 
Macro
WITHGENSYMS
(names &body forms)Binds each variable named by a symbol in NAMES to a unique symbol around FORMS. Each of NAMES must either be either a symbol, or of the form: (symbol stringdesignator) Bare symbols appearing in NAMES are equivalent to: (symbol symbol) The stringdesignator is used as the argument to GENSYM when constructing the unique symbol the named variable will be bound to. 
Macro
WITHUNIQUENAMES
(names &body forms)Alias for WITHGENSYMS. 
Macro
ONCEONLY
(specs &body forms)Evaluates FORMS with symbols specified in SPECS rebound to temporary variables, ensuring that each initform is evaluated only once. Each of SPECS must either be a symbol naming the variable to be rebound, or of the form: (symbol initform) Bare symbols in SPECS are equivalent to (symbol symbol) Example: (defmacro cons1 (x) (onceonly (x) `(cons ,x ,x))) (let ((y 0)) (cons1 (incf y))) => (1 . 1) 
Function
PARSEBODY
(body &key documentation whole)Parses BODY into (values remainingforms declarations docstring). Documentation strings are recognized only if DOCUMENTATION is true. Syntax errors in body are signalled and WHOLE is used in the signal arguments when given. 
Function
PARSEORDINARYLAMBDALIST
(lambdalist &key (normalize t) allowspecializers (normalizeoptional normalize) (normalizekeyword normalize) (normalizeauxilary normalize))Parses an ordinary lambdalist, returning as multiple values: 1. Required parameters. 2. Optional parameter specifications, normalized into form: (name init suppliedp) 3. Name of the rest parameter, or NIL. 4. Keyword parameter specifications, normalized into form: ((keywordname name) init suppliedp) 5. Boolean indicating &ALLOWOTHERKEYS presence. 6. &AUX parameter specifications, normalized into form (name init). 7. Existence of &KEY in the lambdalist. Signals a PROGRAMERROR is the lambdalist is malformed. 
Macro
DESTRUCTURINGCASE
(keyform &body clauses)DESTRUCTURINGCASE, CCASE, and ECASE are a combination of CASE and DESTRUCTURINGBIND. KEYFORM must evaluate to a CONS. Clauses are of the form: ((CASEKEYS . DESTRUCTURINGLAMBDALIST) FORM*) The clause whose CASEKEYS matches CAR of KEY, as if by CASE, CCASE, or ECASE, is selected, and FORMs are then executed with CDR of KEY is destructured and bound by the DESTRUCTURINGLAMBDALIST. Example: (defun dcase (x) (destructuringcase x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)) ((t &rest rest) (format nil "unknown: ~S" rest)))) (dcase (list :foo 1 2)) ; => "foo: 1, 2" (dcase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (dcase (list :alt1 1)) ; => "alt: 1" (dcase (list :alt2 2)) ; => "alt: 2" (dcase (list :quux 1 2 3)) ; => "unknown: 1, 2, 3" (defun decase (x) (destructuringcase x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)))) (decase (list :foo 1 2)) ; => "foo: 1, 2" (decase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (decase (list :alt1 1)) ; => "alt: 1" (decase (list :alt2 2)) ; => "alt: 2" (decase (list :quux 1 2 3)) ; = error 
Macro
DESTRUCTURINGCCASE
(keyform &body clauses) 
Macro
DESTRUCTURINGECASE
(keyform &body clauses) 
Macro
ENSUREGETHASH
(key hashtable &optional default)Like GETHASH, but if KEY is not found in the HASHTABLE saves the DEFAULT under key before returning it. Secondary return value is true if key was already in the table. 
Function
COPYHASHTABLE
(table &key key test size rehashsize rehashthreshold)Returns a copy of hash table TABLE, with the same keys and values as the TABLE. The copy has the same properties as the original, unless overridden by the keyword arguments. Before each of the original values is set into the new hashtable, KEY is invoked on the value. As KEY defaults to CL:IDENTITY, a shallow copy is returned by default. 
Function
MAPHASHKEYS
(function table)Like MAPHASH, but calls FUNCTION with each key in the hash table TABLE. 
Function
MAPHASHVALUES
(function table)Like MAPHASH, but calls FUNCTION with each value in the hash table TABLE. 
Function
HASHTABLEKEYS
(table)Returns a list containing the keys of hash table TABLE. 
Function
HASHTABLEVALUES
(table)Returns a list containing the values of hash table TABLE. 
Function
HASHTABLEALIST
(table)Returns an association list containing the keys and values of hash table TABLE. 
Function
HASHTABLEPLIST
(table)Returns a property list containing the keys and values of hash table TABLE. 
Function
ALISTHASHTABLE
(alist &rest hashtableinitargs)Returns a hash table containing the keys and values of the association list ALIST. Hash table is initialized using the HASHTABLEINITARGS. 
Function
PLISTHASHTABLE
(plist &rest hashtableinitargs)Returns a hash table containing the keys and values of the property list PLIST. Hash table is initialized using the HASHTABLEINITARGS. 
Macro
SWITCH
(&whole whole (object &key (test 'eql) (key 'identity)) &body clauses)Evaluates first matching clause, returning its values, or evaluates and returns the values of DEFAULT if no keys match. 
Macro
ESWITCH
(&whole whole (object &key (test 'eql) (key 'identity)) &body clauses)Like SWITCH, but signals an error if no key matches. 
Macro
CSWITCH
(&whole whole (object &key (test 'eql) (key 'identity)) &body clauses)Like SWITCH, but signals a continuable error if no key matches. 
Macro
WHICHEVER
(&rest possibilities &environment env)Evaluates exactly one of POSSIBILITIES, chosen at random. 
Macro
XOR
(&rest datums)Evaluates its arguments one at a time, from left to right. If more than one argument evaluates to a true value no further DATUMS are evaluated, and NIL is returned as both primary and secondary value. If exactly one argument evaluates to true, its value is returned as the primary value after all the arguments have been evaluated, and T is returned as the secondary value. If no arguments evaluate to true NIL is retuned as primary, and T as secondary value. 
Macro
NTHVALUEOR
(nthvalue &body forms)Evaluates FORM arguments one at a time, until the NTHVALUE returned by one of the forms is true. It then returns all the values returned by evaluating that form. If none of the forms return a true nth value, this form returns NIL. 
Macro
MULTIPLEVALUEPROG2
(firstform secondform &body forms)Evaluates FIRSTFORM, then SECONDFORM, and then FORMS. Yields as its value all the value returned by SECONDFORM. 
Function
ENSURESYMBOL
(name &optional (package *package*))Returns a symbol with name designated by NAME, accessible in package designated by PACKAGE. If symbol is not already accessible in PACKAGE, it is interned there. Returns a secondary value reflecting the status of the symbol in the package, which matches the secondary return value of INTERN. Example: (ensuresymbol :cons :cl) => cl:cons, :external 
Function
FORMATSYMBOL
(package control &rest arguments)Constructs a string by applying ARGUMENTS to string designator CONTROL as if by FORMAT within WITHSTANDARDIOSYNTAX, and then creates a symbol named by that string. If PACKAGE is NIL, returns an uninterned symbol, if package is T, returns a symbol interned in the current package, and otherwise returns a symbol interned in the package designated by PACKAGE. 
Function
MAKEKEYWORD
(name)Interns the string designated by NAME in the KEYWORD package. 
Function
MAKEGENSYM
(name)If NAME is a nonnegative integer, calls GENSYM using it. Otherwise NAME must be a string designator, in which case calls GENSYM using the designated string as the argument. 
Function
MAKEGENSYMLIST
(length &optional (x "g"))Returns a list of LENGTH gensyms, each generated as if with a call to MAKEGENSYM, using the second (optional, defaulting to "G") argument. 
Function
SYMBOLICATE
(&rest things)Concatenate together the names of some strings and symbols, producing a symbol in the current package. 
Function
ENSUREFUNCTION
(functiondesignator)Returns the function designated by FUNCTIONDESIGNATOR: if FUNCTIONDESIGNATOR is a function, it is returned, otherwise it must be a function name and its FDEFINITION is returned. 
Macro
ENSUREFUNCTIONF
(&rest places)Multipleplace modify macro for ENSUREFUNCTION: ensures that each of PLACES contains a function. 
Function
DISJOIN
(predicate &rest morepredicates)Returns a function that applies each of PREDICATE and MOREPREDICATE functions in turn to its arguments, returning the primary value of the first predicate that returns true, without calling the remaining predicates. If none of the predicates returns true, NIL is returned. 
Function
CONJOIN
(predicate &rest morepredicates)Returns a function that applies each of PREDICATE and MOREPREDICATE functions in turn to its arguments, returning NIL if any of the predicates returns false, without calling the remaining predicates. If none of the predicates returns false, returns the primary value of the last predicate. 
Function
COMPOSE
(function &rest morefunctions)Returns a function composed of FUNCTION and MOREFUNCTIONS that applies its arguments to to each in turn, starting from the rightmost of MOREFUNCTIONS, and then calling the next one with the primary value of the last. 
Function
MULTIPLEVALUECOMPOSE
(function &rest morefunctions)Returns a function composed of FUNCTION and MOREFUNCTIONS that applies its arguments to each in turn, starting from the rightmost of MOREFUNCTIONS, and then calling the next one with all the return values of the last. 
Function
CURRY
(function &rest arguments)Returns a function that applies ARGUMENTS and the arguments it is called with to FUNCTION. 
Function
RCURRY
(function &rest arguments)Returns a function that applies the arguments it is called with and ARGUMENTS to FUNCTION. 
Macro
NAMEDLAMBDA
(name lambdalist &body body)Expands into a lambdaexpression within whose BODY NAME denotes the corresponding function. 
Function
ALISTPLIST
(alist)Returns a property list containing the same keys and values as the association list ALIST in the same order. 
Function
PLISTALIST
(plist)Returns an association list containing the same keys and values as the property list PLIST in the same order. 
Function
ASSOCVALUE
(alist key &key (test 'eql))ASSOCVALUE is an alist accessor very much like ASSOC, but it can be used with SETF. 
Function
RASSOCVALUE
(alist key &key (test 'eql))RASSOCVALUE is an alist accessor very much like RASSOC, but it can be used with SETF. 
Macro
DOPLIST
((key val plist &optional values) &body body)Iterates over elements of PLIST. BODY can be preceded by declarations, and is like a TAGBODY. RETURN may be used to terminate the iteration early. If RETURN is not used, returns VALUES. 
Macro
APPENDF
(place &rest lists &environment env)Modifymacro for APPEND. Appends LISTS to the place designated by the first argument. 
Macro
NCONCF
(place &rest lists &environment env)Modifymacro for NCONC. Concatenates LISTS to place designated by the first argument. 
Macro
UNIONF
(place list &rest args &environment env)Modifymacro for UNION. Saves the union of LIST and the contents of the place designated by the first argument to the designated place. 
Macro
NUNIONF
(place list &rest args &environment env)Modifymacro for NUNION. Saves the union of LIST and the contents of the place designated by the first argument to the designated place. May modify either argument. 
Macro
REVERSEF
(place &environment env)Modifymacro for REVERSE. Copies and reverses the list stored in the given place and saves back the result into the place. 
Macro
NREVERSEF
(place &environment env)Modifymacro for NREVERSE. Reverses the list stored in the given place by destructively modifying it and saves back the result into the place. 
Function
CIRCULARLIST
(&rest elements)Creates a circular list of ELEMENTS. 
Function
CIRCULARLISTP
(object)Returns true if OBJECT is a circular list, NIL otherwise. 
Function
CIRCULARTREEP
(object)Returns true if OBJECT is a circular tree, NIL otherwise. 
Function
PROPERLISTP
(object)Returns true if OBJECT is a proper list. 
Type
PROPERLIST
Type designator for proper lists. Implemented as a SATISFIES type, hence not recommended for performance intensive use. Main usefullness as a type designator of the expected type in a TYPEERROR. 
Function
PROPERLISTLENGTH
(list)Returns length of LIST, signalling an error if it is not a proper list. 
Function
LASTCAR
(list)Returns the last element of LIST. Signals a typeerror if LIST is not a proper list. 
Function
(setf LASTCAR)
(object list)Sets the last element of LIST. Signals a typeerror if LIST is not a proper list. 
Function
MAKECIRCULARLIST
(length &key initialelement)Creates a circular list of LENGTH with the given INITIALELEMENT. 
Type
CIRCULARLIST
Type designator for circular lists. Implemented as a SATISFIES type, so not recommended for performance intensive use. Main usefullness as the expectedtype designator of a TYPEERROR. 
Function
ENSURECAR
(thing)If THING is a CONS, its CAR is returned. Otherwise THING is returned. 
Function
ENSURECONS
(cons)If CONS is a cons, it is returned. Otherwise returns a fresh cons with CONS in the car, and NIL in the cdr. 
Function
ENSURELIST
(list)If LIST is a list, it is returned. Otherwise returns the list designated by LIST. 
Function
REMOVEFROMPLIST
(plist &rest keys)Returns a properylist with same keys and values as PLIST, except that keys in the list designated by KEYS and values corresponding to them are removed. The returned propertylist may share structure with the PLIST, but PLIST is not destructively modified. Keys are compared using EQ. 
Function
DELETEFROMPLIST
(plist &rest keys)Just like REMOVEFROMPLIST, but this version may destructively modify the provided plist. 
Macro
REMOVEFROMPLISTF
(place &rest keys &environment env)Modify macro for REMOVEFROMPLIST. 
Macro
DELETEFROMPLISTF
(place &rest keys &environment env)Modify macro for DELETEFROMPLIST. 
Function
MAPPEND
(function &rest lists)Applies FUNCTION to respective element(s) of each LIST, appending all the all the result list to a single list. FUNCTION must return a list. 
Function
SETP
(object &key (test #'eql) (key #'identity))Returns true if OBJECT is a list that denotes a set, NIL otherwise. A list denotes a set if each element of the list is unique under KEY and TEST. 
Function
SETEQUAL
(list1 list2 &key (test #'eql) (key nil keyp))Returns true if every element of LIST1 matches some element of LIST2 and every element of LIST2 matches some element of LIST1. Otherwise returns false. 
Function
MAPPRODUCT
(function list &rest morelists)Returns a list containing the results of calling FUNCTION with one argument from LIST, and one from each of MORELISTS for each combination of arguments. In other words, returns the product of LIST and MORELISTS using FUNCTION. Example: (mapproduct 'list '(1 2) '(3 4) '(5 6)) => ((1 3 5) (1 3 6) (1 4 5) (1 4 6) (2 3 5) (2 3 6) (2 4 5) (2 4 6)) 
Function
FLATTEN
(tree)Traverses the tree in order, collecting nonnull leaves into a list. 
Type
ARRAYINDEX
(&optional (length (1 arraydimensionlimit)))Type designator for an index into array of LENGTH: an integer between 0 (inclusive) and LENGTH (exclusive). LENGTH defaults to one less than ARRAYDIMENSIONLIMIT. 
Type
ARRAYLENGTH
(&optional (length (1 arraydimensionlimit)))Type designator for a dimension of an array of LENGTH: an integer between 0 (inclusive) and LENGTH (inclusive). LENGTH defaults to one less than ARRAYDIMENSIONLIMIT. 
Type
NEGATIVEFIXNUM
Type specifier denoting the fixnum range from MOSTNEGATIVEFIXNUM to 1. 
Type
NONPOSITIVEFIXNUM
Type specifier denoting the fixnum range from MOSTNEGATIVEFIXNUM to 0. 
Type
NONNEGATIVEFIXNUM
Type specifier denoting the fixnum range from 0 to MOSTPOSITIVEFIXNUM. 
Type
POSITIVEFIXNUM
Type specifier denoting the fixnum range from 1 to MOSTPOSITIVEFIXNUM. 
Function
NEGATIVEFIXNUMP
(n) 
Function
NONPOSITIVEFIXNUMP
(n) 
Function
NONNEGATIVEFIXNUMP
(n) 
Function
POSITIVEFIXNUMP
(n) 
Type
NEGATIVEINTEGER
Type specifier denoting the integer range from inf to 1. 
Type
NONPOSITIVEINTEGER
Type specifier denoting the integer range from inf to 0. 
Type
NONNEGATIVEINTEGER
Type specifier denoting the integer range from 0 to +inf. 
Type
POSITIVEINTEGER
Type specifier denoting the integer range from 1 to +inf. 
Function
NEGATIVEINTEGERP
(n) 
Function
NONPOSITIVEINTEGERP
(n) 
Function
NONNEGATIVEINTEGERP
(n) 
Function
POSITIVEINTEGERP
(n) 
Type
NEGATIVERATIONAL
Type specifier denoting the rational range from inf to 0. 
Type
NONPOSITIVERATIONAL
Type specifier denoting the rational range from inf to 0. 
Type
NONNEGATIVERATIONAL
Type specifier denoting the rational range from 0 to +inf. 
Type
POSITIVERATIONAL
Type specifier denoting the rational range from 0 to +inf. 
Function
NEGATIVERATIONALP
(n) 
Function
NONPOSITIVERATIONALP
(n) 
Function
NONNEGATIVERATIONALP
(n) 
Function
POSITIVERATIONALP
(n) 
Type
NEGATIVEREAL
Type specifier denoting the real range from inf to 0. 
Type
NONPOSITIVEREAL
Type specifier denoting the real range from inf to 0. 
Type
NONNEGATIVEREAL
Type specifier denoting the real range from 0 to +inf. 
Type
POSITIVEREAL
Type specifier denoting the real range from 0 to +inf. 
Function
NEGATIVEREALP
(n) 
Function
NONPOSITIVEREALP
(n) 
Function
NONNEGATIVEREALP
(n) 
Function
POSITIVEREALP
(n) 
Type
NEGATIVEFLOAT
Type specifier denoting the float range from inf to 0.0. 
Type
NONPOSITIVEFLOAT
Type specifier denoting the float range from inf to 0.0. 
Type
NONNEGATIVEFLOAT
Type specifier denoting the float range from 0.0 to +inf. 
Type
POSITIVEFLOAT
Type specifier denoting the float range from 0.0 to +inf. 
Function
NEGATIVEFLOATP
(n) 
Function
NONPOSITIVEFLOATP
(n) 
Function
NONNEGATIVEFLOATP
(n) 
Function
POSITIVEFLOATP
(n) 
Type
NEGATIVESHORTFLOAT
Type specifier denoting the shortfloat range from inf to 0.0. 
Type
NONPOSITIVESHORTFLOAT
Type specifier denoting the shortfloat range from inf to 0.0. 
Type
NONNEGATIVESHORTFLOAT
Type specifier denoting the shortfloat range from 0.0 to +inf. 
Type
POSITIVESHORTFLOAT
Type specifier denoting the shortfloat range from 0.0 to +inf. 
Function
NEGATIVESHORTFLOATP
(n) 
Function
NONPOSITIVESHORTFLOATP
(n) 
Function
NONNEGATIVESHORTFLOATP
(n) 
Function
POSITIVESHORTFLOATP
(n) 
Type
NEGATIVESINGLEFLOAT
Type specifier denoting the singlefloat range from inf to 0.0. 
Type
NONPOSITIVESINGLEFLOAT
Type specifier denoting the singlefloat range from inf to 0.0. 
Type
NONNEGATIVESINGLEFLOAT
Type specifier denoting the singlefloat range from 0.0 to +inf. 
Type
POSITIVESINGLEFLOAT
Type specifier denoting the singlefloat range from 0.0 to +inf. 
Function
NEGATIVESINGLEFLOATP
(n) 
Function
NONPOSITIVESINGLEFLOATP
(n) 
Function
NONNEGATIVESINGLEFLOATP
(n) 
Function
POSITIVESINGLEFLOATP
(n) 
Type
NEGATIVEDOUBLEFLOAT
Type specifier denoting the doublefloat range from inf to 0.0d0. 
Type
NONPOSITIVEDOUBLEFLOAT
Type specifier denoting the doublefloat range from inf to 0.0d0. 
Type
NONNEGATIVEDOUBLEFLOAT
Type specifier denoting the doublefloat range from 0.0d0 to +inf. 
Type
POSITIVEDOUBLEFLOAT
Type specifier denoting the doublefloat range from 0.0d0 to +inf. 
Function
NEGATIVEDOUBLEFLOATP
(n) 
Function
NONPOSITIVEDOUBLEFLOATP
(n) 
Function
NONNEGATIVEDOUBLEFLOATP
(n) 
Function
POSITIVEDOUBLEFLOATP
(n) 
Type
NEGATIVELONGFLOAT
Type specifier denoting the longfloat range from inf to 0.0d0. 
Type
NONPOSITIVELONGFLOAT
Type specifier denoting the longfloat range from inf to 0.0d0. 
Type
NONNEGATIVELONGFLOAT
Type specifier denoting the longfloat range from 0.0d0 to +inf. 
Type
POSITIVELONGFLOAT
Type specifier denoting the longfloat range from 0.0d0 to +inf. 
Function
NEGATIVELONGFLOATP
(n) 
Function
NONPOSITIVELONGFLOATP
(n) 
Function
NONNEGATIVELONGFLOATP
(n) 
Function
POSITIVELONGFLOATP
(n) 
Function
OFTYPE
(type)Returns a function of one argument, which returns true when its argument is of TYPE. 
Function
TYPE=
(type1 type2)Returns a primary value of T is TYPE1 and TYPE2 are the same type, and a secondary value that is true is the type equality could be reliably determined: primary value of NIL and secondary value of T indicates that the types are not equivalent. 
Macro
COERCEF
(place typespec &environment env)Modifymacro for COERCE. 
Function
COPYARRAY
(array &key (elementtype (arrayelementtype array)) (fillpointer (and (arrayhasfillpointerp array) (fillpointer array))) (adjustable (adjustablearrayp array)))Returns an undisplaced copy of ARRAY, with same fillpointer and adjustability (if any) as the original, unless overridden by the keyword arguments. 
Function
SEQUENCEOFLENGTHP
(sequence length)Return true if SEQUENCE is a sequence of length LENGTH. Signals an error if SEQUENCE is not a sequence. Returns FALSE for circular lists. 
Function
ROTATE
(sequence &optional (n 1))Returns a sequence of the same type as SEQUENCE, with the elements of SEQUENCE rotated by N: N elements are moved from the end of the sequence to the front if N is positive, and N elements moved from the front to the end if N is negative. SEQUENCE must be a proper sequence. N must be an integer, defaulting to 1. If absolute value of N is greater then the length of the sequence, the results are identical to calling ROTATE with (* (signum n) (mod n (length sequence))). Note: the original sequence may be destructively altered, and result sequence may share structure with it. 
Function
SHUFFLE
(sequence &key (start 0) end)Returns a random permutation of SEQUENCE bounded by START and END. Original sequece may be destructively modified, and share storage with the original one. Signals an error if SEQUENCE is not a proper sequence. 
Function
RANDOMELT
(sequence &key (start 0) end)Returns a random element from SEQUENCE bounded by START and END. Signals an error if the SEQUENCE is not a proper nonempty sequence, or if END and START are not proper bounding index designators for SEQUENCE. 
Macro
REMOVEF
(place item &rest keywordarguments &environment env)Modifymacro for REMOVE. Sets place designated by the first argument to the result of calling REMOVE with ITEM, place, and the REMOVEKEYWORDS. 
Macro
DELETEF
(place item &rest keywordarguments &environment env)Modifymacro for DELETE. Sets place designated by the first argument to the result of calling DELETE with ITEM, place, and the REMOVEKEYWORDS. 
Type
PROPERSEQUENCE
Type designator for proper sequences, that is proper lists and sequences that are not lists. 
Function
LENGTH=
(&rest sequences)Takes any number of sequences or integers in any order. Returns true iff the length of all the sequences and the integers are equal. Hint: there's a compiler macro that expands into more efficient code if the first argument is a literal integer. 
Function
COPYSEQUENCE
(type sequence)Returns a fresh sequence of TYPE, which has the same elements as SEQUENCE. 
Function
FIRSTELT
(sequence)Returns the first element of SEQUENCE. Signals a typeerror if SEQUENCE is not a sequence, or is an empty sequence. 
Function
(setf FIRSTELT)
(object sequence)Sets the first element of SEQUENCE. Signals a typeerror if SEQUENCE is not a sequence, is an empty sequence, or if OBJECT cannot be stored in SEQUENCE. 
Function
LASTELT
(sequence)Returns the last element of SEQUENCE. Signals a typeerror if SEQUENCE is not a proper sequence, or is an empty sequence. 
Function
(setf LASTELT)
(object sequence)Sets the last element of SEQUENCE. Signals a typeerror if SEQUENCE is not a proper sequence, is an empty sequence, or if OBJECT cannot be stored in SEQUENCE. 
Function
STARTSWITHSUBSEQ
(prefix sequence &rest args &key (returnsuffix nil returnsuffixsuppliedp) &allowotherkeys)Test whether the first elements of SEQUENCE are the same (as per TEST) as the elements of PREFIX. If RETURNSUFFIX is T the function returns, as a second value, a subsequence or displaced array pointing to the sequence after PREFIX. 
Function
ENDSWITHSUBSEQ
(suffix sequence &key (test #'eql))Test whether SEQUENCE ends with SUFFIX. In other words: return true if the last (length SUFFIX) elements of SEQUENCE are equal to SUFFIX. 
Function
STARTSWITH
(object sequence &key (test #'eql) (key #'identity))Returns true if SEQUENCE is a sequence whose first element is EQL to OBJECT. Returns NIL if the SEQUENCE is not a sequence or is an empty sequence. 
Function
ENDSWITH
(object sequence &key (test #'eql) (key #'identity))Returns true if SEQUENCE is a sequence whose last element is EQL to OBJECT. Returns NIL if the SEQUENCE is not a sequence or is an empty sequence. Signals an error if SEQUENCE is an improper list. 
Function
MAPCOMBINATIONS
(function sequence &key (start 0) end length (copy t))Calls FUNCTION with each combination of LENGTH constructable from the elements of the subsequence of SEQUENCE delimited by START and END. START defaults to 0, END to length of SEQUENCE, and LENGTH to the length of the delimited subsequence. (So unless LENGTH is specified there is only a single combination, which has the same elements as the delimited subsequence.) If COPY is true (the default) each combination is freshly allocated. If COPY is false all combinations are EQ to each other, in which case consequences are specified if a combination is modified by FUNCTION. 
Function
MAPPERMUTATIONS
(function sequence &key (start 0) end length (copy t))Calls function with each permutation of LENGTH constructable from the subsequence of SEQUENCE delimited by START and END. START defaults to 0, END to length of the sequence, and LENGTH to the length of the delimited subsequence. 
Function
MAPDERANGEMENTS
(function sequence &key (start 0) end (copy t))Calls FUNCTION with each derangement of the subsequence of SEQUENCE denoted by the bounding index designators START and END. Derangement is a permutation of the sequence where no element remains in place. SEQUENCE is not modified, but individual derangements are EQ to each other. Consequences are unspecified if calling FUNCTION modifies either the derangement or SEQUENCE. 
Function
EXTREMUM
(sequence predicate &key key (start 0) end)Returns the element of SEQUENCE that would appear first if the subsequence bounded by START and END was sorted using PREDICATE and KEY. EXTREMUM determines the relationship between two elements of SEQUENCE by using the PREDICATE function. PREDICATE should return true if and only if the first argument is strictly less than the second one (in some appropriate sense). Two arguments X and Y are considered to be equal if (FUNCALL PREDICATE X Y) and (FUNCALL PREDICATE Y X) are both false. The arguments to the PREDICATE function are computed from elements of SEQUENCE using the KEY function, if supplied. If KEY is not supplied or is NIL, the sequence element itself is used. If SEQUENCE is empty, NIL is returned. 
Function
CLAMP
(number min max)Clamps the NUMBER into [min, max] range. Returns MIN if NUMBER is lesser then MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER. 
Function
GAUSSIANRANDOM
(&optional min max)Returns two gaussian random double floats as the primary and secondary value, optionally constrained by MIN and MAX. Gaussian random numbers form a standard normal distribution around 0.0d0. Sufficiently positive MIN or negative MAX will cause the algorithm used to take a very long time. If MIN is positive it should be close to zero, and similarly if MAX is negative it should be close to zero. 
Function
IOTA
(n &key (start 0) (step 1))Return a list of n numbers, starting from START (with numeric contagion from STEP applied), each consequtive number being the sum of the previous one and STEP. START defaults to 0 and STEP to 1. Examples: (iota 4) => (0 1 2 3) (iota 3 :start 1 :step 1.0) => (1.0 2.0 3.0) (iota 3 :start 1 :step 1/2) => (1 3/2 2) 
Function
MAPIOTA
(function n &key (start 0) (step 1))Calls FUNCTION with N numbers, starting from START (with numeric contagion from STEP applied), each consequtive number being the sum of the previous one and STEP. START defaults to 0 and STEP to 1. Returns N. Examples: (mapiota #'print 3 :start 1 :step 1.0) => 3 ;;; 1.0 ;;; 2.0 ;;; 3.0 
Function
LERP
(v a b)Returns the result of linear interpolation between A and B, using the interpolation coefficient V. 
Function
MEAN
(sample)Returns the mean of SAMPLE. SAMPLE must be a sequence of numbers. 
Function
MEDIAN
(sample)Returns median of SAMPLE. SAMPLE must be a sequence of real numbers. 
Function
VARIANCE
(sample &key (biased t))Variance of SAMPLE. Returns the biased variance if BIASED is true (the default), and the unbiased estimator of variance if BIASED is false. SAMPLE must be a sequence of numbers. 
Function
STANDARDDEVIATION
(sample &key (biased t))Standard deviation of SAMPLE. Returns the biased standard deviation if BIASED is true (the default), and the square root of the unbiased estimator for variance if BIASED is false (which is not the same as the unbiased estimator for standard deviation). SAMPLE must be a sequence of numbers. 
Macro
MAXF
(place &rest numbers &environment env)Modifymacro for MAX. Sets place designated by the first argument to the maximum of its original value and NUMBERS. 
Macro
MINF
(place &rest numbers &environment env)Modifymacro for MIN. Sets place designated by the first argument to the minimum of its original value and NUMBERS. 
Function
FACTORIAL
(n)Factorial of nonnegative integer N. 
Function
BINOMIALCOEFFICIENT
(n k)Binomial coefficient of N and K, also expressed as N choose K. This is the number of K element combinations given N choises. N must be equal to or greater then K. 
Function
SUBFACTORIAL
(n)Subfactorial of the nonnegative integer N. 
Function
COUNTPERMUTATIONS
(n &optional (k n))Number of K element permutations for a sequence of N objects. K defaults to N 
Function
FEATUREP
(featureexpression)Returns T if the argument matches the state of the *FEATURES* list and NIL if it does not. FEATUREEXPRESSION can be any atom or list acceptable to the reader macros #+ and #.