The serapeum Reference Manual

This is the serapeum Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:51:48 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 serapeum

Utilities beyond Alexandria.

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
  • extensible-sequences (system)., required, for feature :abcl
  • alexandria (system).
  • trivia (system).
  • split-sequence (system).
  • string-case (system).
  • parse-number (system).
  • trivial-garbage (system).
  • bordeaux-threads (system).
  • parse-declarations-1.0 (system).
  • introspect-environment (system).
  • trivial-cltl2 (system).
  • global-vars (system).
  • trivial-file-size (system).
  • trivial-macroexpand-all (system).
Source

serapeum.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 serapeum/level0

Dependency

macro-tools.lisp (file).

Source

serapeum.asd.

Parent Component

serapeum (system).

Child Components

3.2 serapeum/level1

Dependency

level0 (module).

Source

serapeum.asd.

Parent Component

serapeum (system).

Child Components

3.3 serapeum/level2

Dependency

level1 (module).

Source

serapeum.asd.

Parent Component

serapeum (system).

Child Components

3.4 serapeum/contrib

Dependency

level2 (module).

Source

serapeum.asd.

Parent Component

serapeum (system).

Child Component

hooks.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 serapeum/serapeum.asd

Source

serapeum.asd.

Parent Component

serapeum (system).

ASDF Systems

serapeum.


4.1.2 serapeum/package.lisp

Source

serapeum.asd.

Parent Component

serapeum (system).

Packages

4.1.3 serapeum/portability.lisp

Dependency

package.lisp (file).

Source

serapeum.asd.

Parent Component

serapeum (system).

Public Interface
Internals

4.1.4 serapeum/macro-tools.lisp

Dependency

portability.lisp (file).

Source

serapeum.asd.

Parent Component

serapeum (system).

Public Interface
Internals

4.1.5 serapeum/level0/types.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.6 serapeum/level0/definitions.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.7 serapeum/level0/defining-types.lisp

Dependency

iter.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Packages

serapeum.unlocked.

Public Interface
Internals

4.1.8 serapeum/level0/binding.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.9 serapeum/level0/control-flow.lisp

Dependency

definitions.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.10 serapeum/level0/threads.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.11 serapeum/level0/iter.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.12 serapeum/level0/conditions.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

4.1.13 serapeum/level0/op.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Packages

serapeum/op.

Public Interface
  • op (macro).
  • opf (macro).
Internals

4.1.14 serapeum/level0/functions.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.15 serapeum/level0/trees.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.16 serapeum/level0/hash-tables.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.17 serapeum/level0/files.lisp

Dependency

types.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.18 serapeum/level0/symbols.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

4.1.19 serapeum/level0/arrays.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

4.1.20 serapeum/level0/queue.lisp

Dependency

types.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.21 serapeum/level0/box.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.22 serapeum/level0/numbers.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.23 serapeum/level0/octets.lisp

Dependency

types.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

octet-vector=/unsafe (function).


4.1.24 serapeum/level0/time.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.25 serapeum/level0/clos.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.26 serapeum/level0/hooks.lisp

Dependency

threads.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

4.1.27 serapeum/level0/fbind.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.28 serapeum/level0/static-let.lisp

Dependency

fbind.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Packages

serapeum/static-let.

Public Interface
Internals

4.1.29 serapeum/level0/reader.lisp

Dependency

definitions.lisp (file).

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

with-standard-input-syntax (macro).

Internals

4.1.30 serapeum/level0/packages.lisp

Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface

4.1.31 serapeum/level0/heap.lisp

Dependencies
Source

serapeum.asd.

Parent Component

level0 (module).

Public Interface
Internals

4.1.32 serapeum/level1/lists.lisp

Source

serapeum.asd.

Parent Component

level1 (module).

Public Interface
Internals

4.1.33 serapeum/level1/sequences.lisp

Dependency

lists.lisp (file).

Source

serapeum.asd.

Parent Component

level1 (module).

Public Interface
Internals

4.1.34 serapeum/level1/strings.lisp

Dependency

sequences.lisp (file).

Source

serapeum.asd.

Parent Component

level1 (module).

Public Interface
Internals

4.1.35 serapeum/level1/vectors.lisp

Dependency

lists.lisp (file).

Source

serapeum.asd.

Parent Component

level1 (module).

Public Interface
Internals

4.1.36 serapeum/level2/exporting.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum.exporting.

Public Interface
Internals

define-simple-exporter (macro).


4.1.37 serapeum/level2/vector=.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum/vector=.

Public Interface
Internals

4.1.38 serapeum/level2/mop.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum/mop.

Public Interface
Internals

4.1.39 serapeum/level2/internal-definitions.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum/internal-definitions.

Public Interface
Internals

4.1.40 serapeum/level2/tree-case.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Public Interface
Internals

4.1.41 serapeum/level2/dispatch-case.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum/dispatch-case.

Public Interface
Internals

4.1.42 serapeum/level2/range.lisp

Dependency

dispatch-case.lisp (file).

Source

serapeum.asd.

Parent Component

level2 (module).

Public Interface
Internals

4.1.43 serapeum/level2/generalized-arrays.lisp

Dependency

range.lisp (file).

Source

serapeum.asd.

Parent Component

level2 (module).

Packages

serapeum/generalized-arrays.

Public Interface
Internals

4.1.44 serapeum/level2/units.lisp

Source

serapeum.asd.

Parent Component

level2 (module).

Public Interface
Internals

4.1.45 serapeum/contrib/hooks.lisp

Source

serapeum.asd.

Parent Component

contrib (module).

Packages

serapeum/contrib/hooks.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 serapeum/static-let

Source

static-let.lisp.

Use List

common-lisp.

Internals

5.2 serapeum.exporting

Source

exporting.lisp.

Public Interface

5.3 serapeum/bundle

Source

package.lisp.

Use List
  • alexandria.
  • org.mapcar.parse-number.
  • serapeum.
  • split-sequence.

5.4 serapeum/vector=

Source

vector=.lisp.

Use List
Internals

5.5 serapeum

Utilities beyond Alexandria.

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • org.mapcar.parse-number.
  • split-sequence.
  • tcr.parse-declarations-1.0.
Used By List
Public Interface
Internals

5.6 serapeum.sum

Source

package.lisp.

Public Interface

sum (function).


5.7 serapeum/op

Source

op.lisp.

Use List
Internals

5.8 serapeum/dispatch-case

Source

dispatch-case.lisp.

Use List
Internals

5.9 serapeum/generalized-arrays

Implementation of generalized arrays.

Source

generalized-arrays.lisp.

Use List
Public Interface
Internals

5.10 serapeum-user

Source

package.lisp.

Use List

5.11 serapeum.unlocked

Source

defining-types.lisp.

Public Interface

%union (symbol macro).


5.12 serapeum/contrib/hooks

Source

hooks.lisp.

Use List

common-lisp.

Public Interface
Internals

5.13 serapeum/internal-definitions

Source

internal-definitions.lisp.

Use List
Internals

5.14 serapeum/mop

Source

mop.lisp.

Use List
  • alexandria.
  • closer-common-lisp.
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Constants

Constant: +merge-tail-calls+

Try to ensure that tail calls will be merged.

If you just want portable self-calls, for writing loops using recursion, use ‘nlet’ or ‘defloop’ instead.

This may not work at all on some Lisps.

Package

serapeum.

Source

macro-tools.lisp.


6.1.2 Special variables

Special Variable: *boolean-bypass*

Bypasses macroexpand-time branching of WITH-BOOLEAN. The bypass inhibits all macroexpand-time branching and instead defers all checks in expanded code to runtime in the following manner:

* WITH-BOOLEAN -> PROGN
* BOOLEAN-IF -> IF
* BOOLEAN-WHEN -> WHEN
* BOOLEAN-UNLESS -> UNLESS

Package

serapeum.

Source

types.lisp.

Special Variable: *hook*

The hook currently being run.

Package

serapeum.

Source

hooks.lisp.


6.1.3 Symbol macros

Symbol Macro: %union
Package

serapeum.unlocked.

Source

defining-types.lisp.

Symbol Macro: whitespace
Package

serapeum.

Source

strings.lisp.


6.1.4 Macros

Macro: -> (function (&rest args) &optional values)

Declaim the ftype of FUNCTION from ARGS to VALUES.

(-> mod-fixnum+ (fixnum fixnum) fixnum) (defun mod-fixnum+ (x y) ...)

Package

serapeum.

Source

types.lisp.

Macro: and-let* ((&rest clauses) &body body)

Scheme’s guarded LET* (SRFI-2).

Each clause should have one of the following forms:

- ‘identifier’, in which case IDENTIFIER’s value is tested.

- ‘(expression)’, in which case the value of EXPRESSION is tested.

- ‘(identifier expression)’ in which case EXPRESSION is evaluated, and, if its value is not false, IDENTIFIER is bound to that value for the remainder of the clauses and the optional body.

Note that, of course, the semantics are slightly different in Common Lisp than in Scheme, because our AND short-circuits on null, not false.

Also, this version makes the bindings immutable.

Package

serapeum.

Source

binding.lisp.

Macro: assure (type-spec &body form)

Macro for inline type checking.

‘assure’ is to ‘the’ as ‘check-type’ is to ‘declare’.

(the string 1) => undefined
(assure string 1) => error

The value returned from the ‘assure’ form is guaranteed to satisfy
TYPE-SPEC. If FORM does not return a value of that type, then a
correctable error is signaled. You can supply a value of the correct
type with the ‘use-value’ restart.

Note that the supplied value is *not* saved into the place designated
by FORM. (But see ‘assuref’.)

Using ‘values’ types is supported, with caveats:
- The types of ‘&rest’ arguments are enforced using ‘soft-list-of’.
- Types defined with ‘deftype’ that expand into values types may not be checked in some Lisps.

From ISLISP.

Package

serapeum.

Source

types.lisp.

Macro: assuref (place type-spec)

Like ‘(progn (check-type PLACE TYPE-SPEC) PLACE)‘, but evaluates PLACE only once.

Package

serapeum.

Source

types.lisp.

Macro: bcond (&body clauses)

Scheme’s extended COND.

This is exactly like COND, except for clauses having the form

(test :=> recipient)

In that case, if TEST evaluates to a non-nil result, then RECIPIENT, a function, is called with that result, and the result of RECIPIENT is return as the value of the ‘cond‘.

As an extension, a clause like this:

(test :=> var ...)

Can be used as a shorthand for

(test :=> (lambda (var) ...))

The name ‘bcond’ for a “binding cond” goes back at least to the days of the Lisp Machines. I do not know who was first to use it, but the oldest examples I have found are by Michael Parker and Scott L. Burson.

Package

serapeum.

Source

control-flow.lisp.

Macro: block-compile ((&key entry-points block-compile) &body body)

Shorthand for block compilation with ‘local*’.

Only the functions in ENTRY-POINTS will have global definitions. All other functions in BODY will be compiled as purely local functions, and all of their calls to one another will be compiled as local calls. This includes calls to the entry points, and even self-calls from within the entry points.

Note that ‘declaim’ forms occuring inside of BODY will be translated into local ‘declare’ forms.

If you pass ‘:block-compile nil’, this macro is equivalent to progn. This may be useful during development.

Package

serapeum.

Source

internal-definitions.lisp.

Macro: boolean-if (branch then &optional else)

Chooses between the forms to include based on whether a macroexpand-time branch is true. The first argument must be a symbol naming a branch in the lexically enclosing WITH-BOOLEAN form.

It is an error to use this macro outside the lexical environment established by WITH-BOOLEAN.

Package

serapeum.

Source

types.lisp.

Macro: boolean-unless (branch &body body)

Includes some forms based on whether a macroexpand-time branch is false. The first argument must be a symbol naming a branch in the lexically enclosing WITH-BOOLEAN form.

It is an error to use this macro outside the lexical environment established by WITH-BOOLEAN.

Package

serapeum.

Source

types.lisp.

Macro: boolean-when (branch &body body)

Includes some forms based on whether a macroexpand-time branch is true. The first argument must be a symbol naming a branch in the lexically enclosing WITH-BOOLEAN form.

It is an error to use this macro outside the lexical environment established by WITH-BOOLEAN.

Package

serapeum.

Source

types.lisp.

Macro: callf (function place &rest args)

Set PLACE to the value of calling FUNCTION on PLACE, with ARGS.

Package

serapeum.

Source

macro-tools.lisp.

Macro: callf2 (function arg1 place &rest args)

Like CALLF, but with the place as the second argument.

Package

serapeum.

Source

macro-tools.lisp.

Macro: case-let ((var expr) &body cases)

Like (let ((VAR EXPR)) (case VAR ...)), with VAR read-only.

Package

serapeum.

Source

control-flow.lisp.

Macro: case-of (type x &body clauses)

Like ‘case’ but may, and must, have an ‘otherwise’ clause.

Package

serapeum.

Source

control-flow.lisp.

Macro: case-using (pred keyform &body clauses)

ISLISP’s case-using.

(case-using #’eql x ...)
≡ (case x ...).

Note that, no matter the predicate, the keys are not evaluated. (But see ‘selector’.)

The PRED form is evaluated.

This version supports both single-item clauses (x ...) and
multiple-item clauses ((x y) ...), as well as (t ...) or (otherwise
...) for the default clause.

Package

serapeum.

Source

control-flow.lisp.

Macro: ccase-of (type keyplace &body body)

Like ‘ecase-of’, but providing a ‘store-value’ restart to correct KEYPLACE and try again.

Package

serapeum.

Source

control-flow.lisp.

Macro: char-case (keyform &body clauses)

Like ‘case’, but specifically for characters.
Expands into ‘tree-case’.

As an extension to the generalized ‘case’ syntax, the keys of a clause can be specified as a literal string.

(defun vowel? (c)
(char-case c
("aeiouy" t)))

Signals an error if KEYFORM does not evaluate to a character.

Package

serapeum.

Source

tree-case.lisp.

Macro: char-ecase (keyform &body clauses)

Like ‘ecase’, but specifically for characters. Expands into ‘tree-case’.

Package

serapeum.

Source

tree-case.lisp.

Macro: collecting (&body body)

Like ‘with-collector’, with the collector bound to the result of interning ‘collect’ in the current package.

Package

serapeum.

Source

iter.lisp.

Macro: comment (&body body)

A macro that ignores its body and does nothing. Useful for comments-by-example.

Also, as noted in EXTENSIONS.LISP of 1992, "This may seem like a silly macro, but used inside of other macros or code generation facilities it is very useful - you can see comments in the (one-time) macro expansion!"

Package

serapeum.

Source

control-flow.lisp.

Macro: cond-every (&body clauses)

Like ‘cond’, but instead of stopping after the first clause that succeeds, run all the clauses that succeed.

Return the value of the last successful clause.

If a clause begins with ‘cl:otherwise’, it runs only if no preceding form has succeeded.

Note that this does *not* do the same thing as a series of ‘when’ forms: ‘cond-every’ evaluates *all* the tests *before* it evaluates any of the forms.

From Zetalisp.

Package

serapeum.

Source

control-flow.lisp.

Macro: cond-let (var &body clauses)

Cross between COND and LET.

(cond-let x ((test ...)))
≡ (let (x)
(cond ((setf x test) ...)))

Cf. ‘acond’ in Anaphora.

Package

serapeum.

Source

control-flow.lisp.

Macro: ctypecase-of (type keyplace &body body)

Like ‘etypecase-of’, but providing a ‘store-value’ restart to correct KEYPLACE and try again.

Package

serapeum.

Source

control-flow.lisp.

Macro: def (var &body &optional)

Like ‘def’, with implicit export of VAR.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: def (var &body &optional)

The famous "deflex".

Define a top level (global) lexical VAR with initial value VAL,
which is assigned unconditionally as with DEFPARAMETER. If a DOC string is provided, it is attached to both the name |VAR| and the name *STORAGE-FOR-DEFLEX-VAR-|VAR|* as a documentation string of kind ’VARIABLE. The new VAR will have lexical scope and thus may be shadowed by LET bindings without affecting its dynamic (global) value.

The original ‘deflex’ is due to Rob Warnock.

This version of ‘deflex’ differs from the original in the following ways:

- It is possible for VAL to close over VAR.
- On implementations that support it (SBCL, CCL, and LispWorks, at the moment) this version creates a backing variable that is "global" or "static", so there is not just a change in semantics, but also a
gain in efficiency.
- If VAR is a list that starts with ‘values‘, each element is treated as a separate variable and initialized as if by ‘(setf (values VAR...) VAL)‘.

Package

serapeum.

Source

definitions.lisp.

Macro: defalias (name &body body)

Like ‘defalias’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defalias (alias &body def)

Define a value as a top-level function.

(defalias string-gensym (compose #’gensym #’string))

Like (setf (fdefinition ALIAS) DEF), but with a place to put documentation and some niceties to placate the compiler.

Note that a function defined with ‘defalias’ is declared ‘notinline’. This is a matter of semantics: before we can assign to the function, we must make it assignable (which is what ‘notinline’ means).

Name from Emacs Lisp.

Package

serapeum.

Source

definitions.lisp.

Macro: defclass (name supers &body slots)

Like ‘defclass’, but implicitly export the name of the class and the names of all accessors (including readers and writers).

You can specify ‘:export nil’ in the definition of a slot to prevent its accessors from being exported.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defcondition (name supers &body slots)

Alias for ‘define-condition’.

Like (define-condition ...), but blissfully conforming to the same nomenclatural convention as every other definition form in Common Lisp.

Package

serapeum.

Source

defining-types.lisp.

Macro: defconst (symbol init &optional docstring)

Like ‘defconst’, with implicit export of SYMBOL.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defconst (symbol init &optional docstring)

Define a constant, lexically.

‘defconst’ defines a constant using a strategy similar to ‘def’, so you don’t have to +cage+ your constants.

The constant is only redefined on re-evaluation if INIT has a different literal representation than the old value.

A constant defined with ‘defconst’ is guaranteed to be available as soon as it has been defined (for example, for use with reader macros later in the same file). This is not guaranteed to be portably true for ‘defconstant’.

The name is from Emacs Lisp.

Package

serapeum.

Source

definitions.lisp.

Macro: defconstant (name value &optional doc)

Like ‘defconstant’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defconstructor (type-name &body slots)

A variant of ‘defstruct’ for modeling immutable data.

The structure defined by ‘defconstructor’ has only one constructor, which takes its arguments as required arguments (a BOA constructor). Thus, ‘defconstructor’ is only appropriate for data structures that require no initialization.

The printed representation of an instance resembles its constructor:

(person "Common Lisp" 33)
=> (PERSON "Common Lisp" 33)

While the constructor is BOA, the copier takes keyword arguments, allowing you to override the values of a selection of the slots of the structure being copied, while retaining the values of the others.

(defconstructor person
(name string)
(age (integer 0 1000)))

(defun birthday (person)
(copy-person person :age (1+ (person-age person))))

(birthday (person "Common Lisp" 33))
=> (PERSON "Common Lisp" 34)

Obviously the copier becomes more useful the more slots the type has.

When ‘*print-readably*’ is true, the printed representation is readable:

(person "Common Lisp" 33)
=> #.(PERSON "Common Lisp" 33)

(Why override how a structure is normally printed? Structure types are not necessarily readable unless they have a default (‘make-X’) constructor. Since the type defined by ‘defconstructor’ has only one constructor, we have to take over to make sure it re-readable.)

Besides being re-readable, the type is also externalizable, with a method for ‘make-load-form’:

(make-load-form (person "Common Lisp" 33))
=> (PERSON "Common Lisp" 33)

Users of Trivia get an extra benefit: defining a type with ‘defconstructor’ also defines a symmetrical pattern for destructuring that type.

(trivia:match (person "Common Lisp" 33)
((person name age)
(list name age)))
=> ("Common Lisp" 33)

Note that the arguments to the pattern are optional:

(trivia:match (person "Common Lisp" 33)
((person name) name))
=> "Common Lisp"

If you don’t use Trivia, you can still do destructuring with ‘deconstruct’, which returns the slots of a constructor as multiple values:

(deconstruct (person "Common Lisp" 33))
=> "Common Lisp", 33

Note also that no predicate is defined for the type, so to test for the type you must either use ‘typep’ or pattern matching as above.

While it is possible to inherit from a type defined with ‘defconstructor’ (this is Lisp, I can’t stop you), it’s a bad idea. In particular, on Lisps which support it, a type defined with ‘defconstructor’ is declared to be frozen (sealed), so your new subtype may not be recognized in type tests that have already been compiled.

Because ‘defconstructor’ is implemented on top of ‘defstruct-read-only’, it shares the limitations of ‘defstruct-read-only’. In particular it cannot use inheritance.

The design of ‘defconstructor’ is mostly inspired by Scala’s [case classes](https://docs.scala-lang.org/tour/case-classes.html), with some implementation tricks from ‘cl-algebraic-data-type’.

Package

serapeum.

Source

defining-types.lisp.

Macro: defgeneric (name lambda-list &body options)

Like ‘defgeneric’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: define-case-macro (name macro-args params &body macro-body)

Define a macro like ‘case’.

A case-like macro is one that supports the following syntax:

- A list of keys is treated as matching any key in the list.
- An empty list matches nothing.
- The atoms T or ‘otherwise’ introduce a default clause.
- There can only be one default clause.
- The default clause must come last.
- Any atom besides the empty list, T, or ‘otherwise’ matches itself.

As a consequence of the above, to match against the empty list, T, or ‘otherwise’, they must be wrapped in a list.

(case x
((nil) "Matched nil.")
((t) "Matched t.")
((otherwise) "Matched ‘otherwise’.")
(otherwise "Didn’t match anything."))

A macro defined using ‘define-case-macro’ can ignore all of the above. It receives three arguments: the expression, already protected against multiple evaluation; a normalized list of clauses; and, optionally, a default clause.

The clauses are normalized as a list of ‘(key . body)’, where each key is an atom. (That includes nil, T, and ‘otherwise’.) Nonetheless, each body passed to the macro will only appear once in the expansion; there will be no duplicated code.

The body of the default clause is passed separately,
bound to the value of the ‘:default’ keyword in PARAMS.

(define-case-macro my-case (expr &body clauses)
(:default default)
....)

Note that in this case, ‘default’ will be bound to the clause’s body – a list of forms – and not to the whole clause. The key of the default clause is discarded.

If no binding is specified for the default clause, then no default clause is allowed.

One thing you do still have to consider is the handling of duplicated keys. The macro defined by ‘define-case-macro’ will reject case sets that contains duplicate keys under ‘eql’, but depending on the semantics of your macro, you may need to check for duplicates under a looser definition of equality.

As a final example, if the ‘case’ macro did not already exist, you could define it almost trivially using ‘define-case-macro’:

(define-case-macro my-case (expr &body clause)
(:default default)
‘(cond
,@(loop for (key . body) in clauses
collect ‘((eql ,expr ,key) ,@body))
(t ,@body)))

Package

serapeum.

Source

macro-tools.lisp.

Macro: define-do-macro (name binds &body body)

Define an iteration macro like ‘dolist’.

Writing a macro like ‘dolist’ is more complicated than it looks. For consistency with the rest of CL, you have to do all of the following:

- The entire loop must be surrounded with an implicit ‘nil’ block.
- The body of the loop must be an implicit ‘tagbody’.
- There must be an optional ‘return’ form which, if given, supplies
the values to return from the loop.
- While this return form is being evaluated, the iteration variables
must be bound to ‘nil’.

Say you wanted to define a ‘do-hash’ macro that iterates over hash
tables. A full implementation would look like this:

(defmacro do-hash ((key value hash-table &optional return) &body body) (multiple-value-bind (body decls) (parse-body body)
‘(block nil
(maphash (lambda (,key ,value)
,@decls
(tagbody
,@body))
,hash-table)
,(when return
‘(let (,key ,value)
,return)))))

Using ‘define-do-macro’ takes care of all of this for you.

(define-do-macro do-hash ((key value hash-table &optional return) &body body) ‘(maphash (lambda (,key ,value)
,@body)
,hash-table))

Package

serapeum.

Source

macro-tools.lisp.

Macro: define-hook-type (name type)

Define hook class and constructor and the associated handler class.
Type must be something like:

(function (string) (values integer t))

A function with name make-handler-NAME will be created.
A class with name handler-NAME will be created.
The method ‘add-hook’ is added for the new hook and handler types.

The function make-hook-NAME is created. It is similar to (make-instance ’hook-NAME ...) except that named functions are also accepted. Named functions will be automatically encapsulated with make-handler-NAME.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Macro: define-post-modify-macro (name lambda-list function &optional documentation)

Like ‘define-modify-macro’, but arranges to return the original value.

Package

serapeum.

Source

macro-tools.lisp.

Macro: define-symbol-macro (symbol expansion)

Like ‘define-symbol-macro’, with implicit export of SYMBOL.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: define-train (name args &body body)

Define a higher-order function and its compiler macro at once.

When defining a higher-order function it is often a good idea to write a compiler macro so compilers can inline the resulting lambda form.

For the special case of a fixed-arity function that only takes other functions as arguments, you can use ‘define-train’ to define the function and the compiler macro in one go. The catch is that you have to write the single definition as a macro.

E.g., if ‘complement’ did not exist, you could define it like so:

(define-train complement (fn)
‘(lambda (&rest args)
(not (apply ,fn args))))

Besides providing an implicit compiler macro, ‘define-train’ also inserts the proper declarations to ensure the compiler recognizes the function arguments as functions, avoiding runtime type checks.

The term "train" is from J.

Package

serapeum.

Source

functions.lisp.

Macro: define-values (values &body expr)

Like ‘define-values’, with implicit export of VALUES.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: define-values (values &body expr)

Like ‘def’, but for multiple values.
Each variable in VALUES is given a global, lexical binding, as with ‘def’, then set all at once, as with ‘multiple-value-setq’.

Package

serapeum.

Source

definitions.lisp.

Macro: defloop (name args &body body)

Define a function, ensuring proper tail recursion. This is entirely equivalent to ‘defun’ over ‘nlet’.

Package

serapeum.

Source

definitions.lisp.

Macro: defmacro (name &body body)

Like ‘defmacro’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defmethod (name &body args)

Like ‘defmethod’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defmethods (class (self . slots) &body body)

Concisely define methods that specialize on the same class.

You can already use ‘defgeneric’ to define an arbitrary number of methods on a single generic function without having to repeat the name of the function:

(defgeneric fn (x)
(:method ((x string)) ...)
(:method ((x number)) ...))

Which is equivalent to:

(defgeneric fn (x))

(defmethod fn ((x string))
...)

(defmethod fn ((x number))
...)

Similarly, you can use ‘defmethods’ to define methods that specialize on the same class, and access the same slots, without having to repeat the names of the class or the slots:

(defmethods my-class (self x y)
(:method initialize-instance :after (self &key)
...)
(:method print-object (self stream)
...)
(:method some-method ((x string) self)
...))

Which is equivalent to:

(defmethod initialize-instance :after ((self my-class) &key) (with-slots (x y) self
...))

(defmethod print-object ((self my-class) stream)
(with-slots (x y) self
...))

(defmethod some-method ((x string) (self my-class)) (with-slots (y) self ;!
...))

Note in particular that ‘self’ can appear in any position, and that you can freely specialize the other arguments.

Just as in ‘with-slots’, slots can be renamed:

(defmethods my-class (self (abscissa x) (ordinate y)) ...)

You can also use ‘defmethods’ in place of ‘with-accessors’, by using a function-quote:

(defmethods my-class (self (x #’my-class-x)
(y #’my-class-y))
...)

(The difference from using ‘with-slots’ is the scope of the slot bindings: they are established *outside* of the method definition, which means argument bindings shadow slot bindings:

(some-method "foo" (make ’my-class :x "bar"))
=> "foo"

Since slot bindings are lexically outside the argument bindings, this is surely correct, even if it makes ‘defmethods’ slightly harder to explain in terms of simpler constructs.)

Is ‘defmethods’ trivial? Yes, in terms of its implementation. This docstring is far longer than the code it documents. But you may find it does a lot to keep heavily object-oriented code readable and organized, without any loss of power.

Note that ‘defmethods’ may also be useful when converting state machines written using ‘labels’ into an object-oriented style.

This construct is very loosely inspired by impl blocks in Rust.

Package

serapeum.

Source

clos.lisp.

Macro: defparameter (var val &optional doc)

Like ‘defparameter’, with implicit export of VAR.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defplace (name args &body body)

Define NAME and (SETF NAME) in one go.

BODY is a list of forms, starting with an optional docstring. The last form in BODY, however, must be a single, setf-able expression.

Package

serapeum.

Source

definitions.lisp.

Macro: defstruct-read-only (name-and-opts &body slots)

Easily define a defstruct with no mutable slots.

The syntax of ‘defstruct-read-only’ is as close as possible to that of ‘defstruct’. Given an existing structure definition, you can usually make it immutable simply by switching out ‘defstruct’ for ‘defstruct-read-only’.

There are only a few syntactic differences:

1. To prevent accidentally inheriting mutable slots, and preserve its own usefulness as a marker of the programmer’s intent, ‘defstruct-read-only’ only allows inheritance from other classes defined using ‘defstruct-read-only’.

2. The ‘:type’ option may not be used.

3. The ‘:copier’ option is disabled, because it would be useless.

4. Slot definitions can use slot options without having to provide an initform. In this case, any attempt to make an instance of the struct without providing a value for that slot will signal an error.

(my-slot :type string)
≡ (my-slot (required-argument ’my-slot) :read-only t :type string)

The idea here is simply that an unbound slot in an immutable data structure does not make sense.

A read-only struct is always externalizable; it has an implicit definition for ‘make-load-form’.

On Lisps that support it, the structure is also marked as "pure": that is, instances may be moved into read-only memory.

‘defstruct-read-only’ is designed to stay as close to the syntax of ‘defstruct’ as possible. The idea is to make it easy to flag data as immutable, whether in your own code or in code you are refactoring. In new code, however, you may sometimes prefer ‘defconstructor’, which is designed to facilitate working with immutable data.

Package

serapeum.

Source

defining-types.lisp.

Macro: defsubst (name params &body body)

Define an inline function.

(defsubst fn ...)
≡ (declaim (inline fn))
(defun fn ...)

The advantage of a separate defining form for inline functions is that you can’t forget to declaim the function inline before defining it – without which it may not actually end up being inlined.

From Emacs and other ancient Lisps.

Package

serapeum.

Source

definitions.lisp.

Macro: deftype (name lamda-list &body body)

Like ‘deftype’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defun (name lambda-list &body body)

Like ‘defun’, with implicit export of NAME.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defunion (union &body variants)

Define an algebraic data type.

Each expression in VARIANTS is either a symbol (in which case it defines a unit type, as with ‘defunit’) or a list (in which case it defines a read-only structure, as with ‘defconstructor’).

UNION is defined as a type equivalent to the disjunction of all the member types. A class is also defined, with the same name, but with angle brackets around it.

Package

serapeum.

Source

defining-types.lisp.

Macro: defunit (name &optional docstring)

Define a unit type.

A unit type is a type with only one instance.

You can think of a unit type as a singleton without state.

Unit types are useful for many of the same purposes as quoted symbols (or keywords) but, unlike a symbol, a unit type is tagged with its own individual type.

Package

serapeum.

Source

defining-types.lisp.

Macro: defvar (var &optional val doc)

Like ‘defvar’, with implicit export of VAR.

Package

serapeum.exporting.

Source

exporting.lisp.

Macro: defvar-unbound (var &body docstring)

Define VAR as if by ‘defvar’ with no init form, and set DOCSTRING as its documentation.

I believe the name comes from Edi Weitz.

Package

serapeum.

Source

definitions.lisp.

Macro: destructuring-case-of (type expr &body body)

Like ‘destructuring-ecase-of’, but an ‘otherwise’ clause must also be supplied.

Note that the otherwise clauses must also be a list:

((otherwise &rest args) ...)

Package

serapeum.

Source

control-flow.lisp.

Macro: destructuring-ccase-of (type keyplace &body body)

Like ‘destructuring-case-of’, but providing a ‘store-value’ restart to collect KEYPLACE and try again.

Package

serapeum.

Source

control-flow.lisp.

Macro: destructuring-ecase-of (type expr &body body)

Like ‘destructuring-ecase’, from Alexandria, but with exhaustivness checking.

TYPE is a designator for a type, which should be defined as ‘(member ...)’. At compile time, the macro checks that, taken together, the symbol at the head of each of the destructuring lists in BODY form an exhaustive partition of TYPE, and warns if it is not so.

Package

serapeum.

Source

control-flow.lisp.

Macro: dictq (&rest keys-and-values)

A literal hash table.
Like ‘dict’, but the keys and values are implicitly quoted, and the hash table is inlined as a literal object.

Package

serapeum.

Source

hash-tables.lisp.

Macro: dispatch-case ((&rest exprs-and-types) &body clauses)

Dispatch on the types of multiple expressions, exhaustively.

Say you are working on a project where you need to handle timestamps represented both as universal times, and as instances of ‘local-time:timestamp’. You start by defining the appropriate types:

(defpackage :dispatch-case-example
(:use :cl :alexandria :serapeum :local-time)
(:shadow :time))
(in-package :dispatch-case-example)

(deftype universal-time ()
’(integer 0 *))

(deftype time ()
’(or universal-time timestamp))

Now you want to write a ‘time=’ function that works on universal times, timestamps, and any combination thereof.

You can do this using ‘etypecase-of’:

(defun time= (t1 t2)
(etypecase-of time t1
(universal-time
(etypecase-of time t2
(universal-time
(= t1 t2))
(timestamp
(= t1 (timestamp-to-universal t2))))) (timestamp
(etypecase-of time t2
(universal-time
(time= t2 t1))
(timestamp
(timestamp= t1 t2))))))

This has the advantage of efficiency and exhaustiveness checking, but the serious disadvantage of being hard to read: to understand what each branch matches, you have to backtrack to the enclosing branch. This is bad enough when the nesting is only two layers deep.

Alternately, you could do it with ‘defgeneric’:

(defgeneric time= (t1 t2)
(:method ((t1 integer) (t2 integer))
(= t1 t2))
(:method ((t1 timestamp) (t2 timestamp))
(timestamp= t1 t2))
(:method ((t1 integer) (t2 timestamp))
(= t1 (timestamp-to-universal t2)))
(:method ((t1 timestamp) (t2 integer))
(time= t2 t1)))

This is easy to read, but it has three potential disadvantages. (1) There is no exhaustiveness checking. If, at some point in the future, you want to add another representation of time to your project, the compiler will not warn you if you forget to update ‘time=’. (This is bad enough with only two objects to dispatch on, but with three or more it gets rapidly easier to miss a case.) (2) You cannot use the ‘universal-time’ type you just defined; it is a type, not a class, so you cannot specialize methods on it. (3) You are paying a run-time price for extensibility – the inherent overhead of a generic function – when extensibility is not what you want.

Using ‘dispatch-case’ instead gives you the readability of ‘defgeneric’ with the efficiency and safety of ‘etypecase-of’.

(defun time= (t1 t2)
(dispatch-case ((t1 time)
(t2 time))
((universal-time universal-time)
(= t1 t2))
((timestamp timestamp)
(timestamp= t1 t2))
((universal-time timestamp)
(= t1 (timestamp-to-universal t2)))
((timestamp universal-time)
(time= t2 t1))))

The syntax of ‘dispatch-case’ is much closer to ‘defgeneric’ than it is to ‘etypecase’. The order in which clauses are defined does not matter, and you can define fallthrough clauses in the same way you would define fallthrough methods in ‘defgeneric’.

Suppose you wanted to write a ‘time=’ function like the one above, but always convert times to timestamps before comparing them. You could write that using ‘dispatch-case’ like so:

(defun time= (x y)
(dispatch-case ((x time)
(y time))
((* universal-time)
(time= x (universal-to-timestamp y)))
((universal-time *)
(time= (universal-to-timestamp x) y))
((timestamp timestamp)
(timestamp= x y))))

(In the list of types, you can use as asterisk as a shorthand for the type of the corresponding argument to ‘dispatch-case’; in that above, ‘time’.)

Note that this requires only three clauses, where writing it out using nested ‘etypecase-of’ forms would require four clauses. This is a small gain; but with more subtypes to dispatch on, or more objects, such fallthrough clauses become more useful.

Package

serapeum.

Source

dispatch-case.lisp.

Macro: dispatch-case-error (&key type datum)
Package

serapeum.

Source

dispatch-case.lisp.

Macro: dispatch-case-let ((&rest bindings) &body clauses)

Like ‘dispatch-case’, but establish new bindings for each expression.

For example,

(dispatch-case-let (((x string) (expr1))
((y string) (expr2)))
...)

is equivalent to

(let ((x (expr1))
(y (expr2)))
(dispatch-case ((x string)
(y string))
...))

It may be helpful to think of this as a cross between
‘defmethod’ (where the (variable type) notation is used in the lambda list) and ‘let’ (which has an obvious macro-expansion in terms of ‘lambda’).

Package

serapeum.

Source

dispatch-case.lisp.

Macro: dispatch-caseql ((&rest exprs-and-types) &body clauses)

Like ‘dispatch-case’, but types in clauses are implicitly wrapped in ‘eql’. The syntax of ‘dispatch-caseql’ is tohus closer to ‘case’ than to ‘typecase’.

Package

serapeum.

Source

dispatch-case.lisp.

Macro: dispatch-caseql-let ((&rest bindings) &body clauses)

Like ‘dispatch-case-let’, but using the clause syntax of ‘dispatch-caseql’.

Package

serapeum.

Source

dispatch-case.lisp.

Macro: do-each ((var seq &optional return) &body body)

Iterate over the elements of SEQ, a sequence. If SEQ is a list, this is equivalent to ‘dolist’.

Package

serapeum.

Source

sequences.lisp.

Macro: do-hash-table ((key value table &optional return) &body body)

Iterate over hash table TABLE, in no particular order.

At each iteration, a key from TABLE is bound to KEY, and the value of that key in TABLE is bound to VALUE.

Package

serapeum.

Source

hash-tables.lisp.

Macro: do-splits (((left right &optional not-at-end?) (seq split-fn &key start end from-end) &optional return) &body body)

For each run of elements in SEQ that does not satisfy SPLIT-FN, call the body with LEFT bound to the start of the run and RIGHT bound to the end of the run.

If ‘split-sequence-if’ did not exist, you could define a simple version trivially with ‘do-splits’ and ‘collecting’:

(defun split-sequence-if (fn seq &key (start 0) end from-end)
(collecting
(do-splits ((l r) (seq fn :start start :end end :from-end from-end))
(collect (subseq seq l r)))))

Providing NOT-AT-END? will bind it as a variable that is T if RIGHT is
not equal to END, and null otherwise. This can be useful when, in
processing a sequence, you want to replace existing delimiters, but do
nothing at the end.

In general ‘do-splits’ will be found useful in situations where you
want to iterate over subsequences in the manner of ‘split-sequence’,
but don’t actually need to realize the sequences.

Package

serapeum.

Source

sequences.lisp.

Macro: ecase-let ((var expr) &body cases)

Like (let ((VAR EXPR)) (ecase VAR ...)), with VAR read-only.

Package

serapeum.

Source

control-flow.lisp.

Macro: ecase-of (type x &body body)

Like ‘ecase’ but, given a TYPE (which should be defined as ‘(member ...)’), warn, at compile time, unless the keys in BODY are all of TYPE and, taken together, they form an exhaustive partition of TYPE.

Package

serapeum.

Source

control-flow.lisp.

Macro: ecase-using (pred keyform &body clauses)

Exhaustive variant of ‘case-using’.

Package

serapeum.

Source

control-flow.lisp.

Macro: econd (&rest clauses)

Like ‘cond’, but signal an error of type ‘econd-failure’ if no clause succeeds.

Package

serapeum.

Source

control-flow.lisp.

Macro: econd-let (symbol &body clauses)

Like ‘cond-let’ for ‘econd’.

Package

serapeum.

Source

control-flow.lisp.

Macro: eif (test then &optional else)

Like ‘cl:if’, but expects two branches.

If there is only one branch a warning is signaled.

This macro is useful when writing explicit decision trees; it will warn you if you forget a branch.

Short for “exhaustive if”.

Package

serapeum.

Source

control-flow.lisp.

Macro: eif-let (binds &body then)

Like ‘alexandria:if-let’, but expects two branches. Compare ‘eif’.

Package

serapeum.

Source

control-flow.lisp.

Macro: ensure (place &body newval)

Essentially (or place (setf place newval)).

PLACE is treated as unbound if it returns ‘nil’, signals ‘unbound-slot’, or signals ‘unbound-variable’.

Note that ENSURE is ‘setf’-able, so you can do things like (incf (ensure x 0))

Cf. ‘ensure2’.

Package

serapeum.

Source

control-flow.lisp.

Setf expander for this macro

(setf ensure).

Macro: ensure2 (place &body newval)

Like ‘ensure’, but specifically for accessors that return a second value like ‘gethash’.

Package

serapeum.

Source

control-flow.lisp.

Setf expander for this macro

(setf ensure2).

Macro: etypecase-of (type x &body body)

Like ‘etypecase’ but, at compile time, warn unless each clause in BODY is a subtype of TYPE, and the clauses in BODY form an exhaustive partition of TYPE.

Package

serapeum.

Source

control-flow.lisp.

Macro: eval-always (&body body)

Shorthand for
(eval-when (:compile-toplevel :load-toplevel :execute) ...)

Package

serapeum.

Source

control-flow.lisp.

Macro: eval-and-compile (&body body)

Emacs’s ‘eval-and-compile’. Alias for ‘eval-always’.

Package

serapeum.

Source

control-flow.lisp.

Macro: example (&body body)

Like ‘comment’.

Package

serapeum.

Source

control-flow.lisp.

Macro: export-always (symbols &optional package)

Like ‘export’, but also evaluated at compile time.

Package

serapeum.

Source

packages.lisp.

Macro: export-only-always (symbols &optional package)

Like ‘export-only’, but also evaluated at compile time.

Package

serapeum.

Source

packages.lisp.

Macro: fbind (bindings &body body)

Binds values in the function namespace.

That is,
(fbind ((fn (lambda () ...))))
≡ (flet ((fn () ...))),

except that a bare symbol in BINDINGS is rewritten as (symbol symbol).

Package

serapeum.

Source

fbind.lisp.

Macro: fbind* (bindings &body body)

Like ‘fbind’, but creates bindings sequentially.

Package

serapeum.

Source

fbind.lisp.

Macro: fbindrec (bindings &body body)

Like ‘fbind’, but creates recursive bindings.

The consequences of referring to one binding in the expression that generates another are undefined.

Package

serapeum.

Source

fbind.lisp.

Macro: fbindrec* (bindings &body body)

Like ‘fbindrec‘, but the function defined in each binding can be used in successive bindings.

Package

serapeum.

Source

fbind.lisp.

Macro: fdec (ref0 &optional delta)

Like ‘decf’, but returns the old value instead of the new.

Package

serapeum.

Source

numbers.lisp.

Macro: filterf (place pred &rest args)

Modify-macro for FILTER.
The place designed by the first argument is set to the result of calling FILTER with PRED, the place, and ARGS.

Package

serapeum.

Source

sequences.lisp.

Macro: finc (ref0 &optional delta)

Like ‘incf’, but returns the old value instead of the new.

An alternative to using -1 as the starting value of a counter, which can prevent optimization.

Package

serapeum.

Source

numbers.lisp.

Macro: growf (place n)

Grow the value in a place by a factor.

Package

serapeum.

Source

numbers.lisp.

Macro: ignoring (type &body body)

DEPRECATED: use ‘alexandria:ignore-some-conditions‘ instead.

Package

serapeum.

Source

conditions.lisp.

Macro: letrec ((&rest bindings) &body body)

Recursive LET.
The idea is that functions created in BINDINGS can close over one another, and themselves.

Note that ‘letrec’ only binds variables: it can define recursive functions, but can’t bind them as functions. (But see ‘fbindrec’.)

Package

serapeum.

Source

binding.lisp.

Macro: letrec* ((&rest bindings) &body body)

Like LETREC, but the bindings are evaluated in order. See Waddell et al., *Fixing Letrec* for motivation.

Cf. ‘fbindrec*’.

Package

serapeum.

Source

binding.lisp.

Macro: local (&body orig-body)

Make internal definitions using top-level definition forms.

Within ‘local’ you can use top-level definition forms and have them create purely local definitions, like ‘let’, ‘labels’, and ‘macrolet’:

(fboundp ’plus) ; => nil

(local
(defun plus (x y)
(+ x y))
(plus 2 2))
;; => 4

(fboundp ’plus) ; => nil

Each form in BODY is subjected to partial expansion (with ‘macroexpand-1’) until either it expands into a recognized definition form (like ‘defun’) or it can be expanded no further.

(This means that you can use macros that expand into top-level definition forms to create local definitions.)

Just as at the real top level, a form that expands into ‘progn’ (or an equivalent ‘eval-when’) is descended into, and definitions that occur within it are treated as top-level definitions.

(Support for ‘eval-when’ is incomplete: ‘eval-when’ is supported only when it is equivalent to ‘progn’).

The recognized definition forms are:

- ‘def’, for lexical variables (as with ‘letrec’)
- ‘define-values’, for multiple lexical variables at once
- ‘defun’, for local functions (as with ‘labels’)
- ‘defalias’, to bind values in the function namespace (like ‘fbindrec*’) - ‘declaim’, to make declarations (as with ‘declare’)
- ‘defconstant’ and ‘defconst’, which behave exactly like symbol macros - ‘define-symbol-macro’, to bind symbol macros (as with ‘symbol-macrolet’)

Also, with serious restrictions, you can use:

- ‘defmacro’, for local macros (as with ‘macrolet’)

(Note that the top-level definition forms defined by Common Lisp
are (necessarily) supplemented by three from Serapeum: ‘def’, ‘define-values’, and ‘defalias’.)

The exact order in which the bindings are made depends on how ‘local’ is implemented at the time you read this. The only guarantees are that variables are bound sequentially; functions can always close over the bindings of variables, and over other functions; and macros can be used once they are defined.

(local
(def x 1)
(def y (1+ x))
y)
=> 2

(local
(defun adder (y)
(+ x y))
(def x 2)
(adder 1))
=> 3

Perhaps surprisingly, ‘let’ forms (as well as ‘let*’ and ‘multiple-value-bind’) *are* descended into; the only difference is that ‘defun’ is implicitly translated into ‘defalias’. This means you can use the top-level idiom of wrapping ‘let’ around ‘defun’.

(local
(let ((x 2))
(defun adder (y)
(+ x y)))
(adder 2))
=> 4

Support for macros is sharply limited. (Symbol macros, on the other hand, are completely supported.)

1. Macros defined with ‘defmacro’ must precede all other expressions.

2. Macros cannot be defined inside of binding forms like ‘let’.

3. ‘macrolet’ is not allowed at the top level of a ‘local’ form.

These restrictions are undesirable, but well justified: it is impossible to handle the general case both correctly and portably, and while some special cases could be provided for, the cost in complexity of implementation and maintenance would be prohibitive.

The value returned by the ‘local’ form is that of the last form in BODY. Note that definitions have return values in ‘local’ just like they do at the top level. For example:

(local
(plus 2 2)
(defun plus (x y)
(+ x y)))

Returns ‘plus’, not 4.

The ‘local’ macro is loosely based on Racket’s support for internal definitions.

Package

serapeum.

Source

internal-definitions.lisp.

Macro: local* (&body body)

Like ‘local’, but leave the last form in BODY intact.

(local*
(defun aux-fn ...)
(defun entry-point ...))
=>
(labels ((aux-fn ...))
(defun entry-point ...))

Package

serapeum.

Source

internal-definitions.lisp.

Macro: lret ((&rest bindings) &body body)

Return the initial value of the last binding in BINDINGS. The idea is to create something, initialize it, and then return it.

(lret ((x 1)
(y (make-array 1)))
(setf (aref y 0) x))
=> #(1)

Note that the value returned is the value initially bound. Subsequent assignments are ignored.

(lret ((x 1))
(setf x 2))
=> 1

Furthermore, on Lisps that support it, the variable may be made read-only, making assignment a compiler-time error.

‘lret’ may seem trivial, but it fufills the highest purpose a macro can: it eliminates a whole class of bugs (initializing an object, but forgetting to return it).

Cf. ‘aprog1’ in Anaphora.

Package

serapeum.

Source

binding.lisp.

Macro: lret* ((&rest bindings) &body body)

Cf. ‘lret’.

Package

serapeum.

Source

binding.lisp.

Macro: match-of (union expr &body clauses)

Do pattern matching on an algebraic data type.

UNION should be an algebraic data type.

Each clause in CLAUSES has a pattern as its first element.

If the pattern is a symbol, it matches a unit type.

If the pattern is a list, it matches a constructor.

If the pattern is an underscore, it introduces a default or fallthrough clause.

If the pattern is a list that starts with ‘or’, it is a disjunction of other patterns.

Package

serapeum.

Source

defining-types.lisp.

Macro: mvlet ((&rest bindings) &body body)

Parallel (‘let’-like) version of ‘mvlet*’.

Package

serapeum.

Source

binding.lisp.

Macro: mvlet* ((&rest bindings) &body body)

Expand a series of nested ‘multiple-value-bind’ forms.

‘mvlet*’ is similar in intent to Scheme’s ‘let-values’, but with a different and less parenthesis-intensive syntax. Each binding is a list of

(var var*... expr)

A simple example should suffice to show both the implementation and the motivation:

(defun uptime (seconds)
(mvlet* ((minutes seconds (truncate seconds 60))
(hours minutes (truncate minutes 60))
(days hours (truncate hours 24)))
(declare ((integer 0 *) days hours minutes seconds)) (fmt "~d day~:p, ~d hour~:p, ~d minute~:p, ~d second~:p" days hours minutes seconds)))

Note that declarations work just like ‘let*’.

Package

serapeum.

Source

binding.lisp.

Macro: nand (&rest forms)

Equivalent to (not (and ...)).

Package

serapeum.

Source

control-flow.lisp.

Macro: nest (&rest things)

Like ~>>, but backward.

This is useful when layering ‘with-x’ macros where the order is not important, and extra indentation would be misleading.

For example:

(nest
(with-open-file (in file1 :direction input)) (with-open-file (in file2 :direction output))
...)

Is equivalent to:

(with-open-file (in file1 :direction input)
(with-open-file (in file2 :direction output) ...))

(But see ‘with-open-files’).

If the outer macro has no arguments, you may omit the parentheses.

(nest
with-standard-io-syntax
...)
≡ (with-standard-io-syntax
...)

From UIOP, based on a suggestion by Marco Baringer.

Package

serapeum.

Source

control-flow.lisp.

Macro: nix (&rest places)

Set PLACES to nil and return the old value(s) of PLACES.

If there is more than one PLACE, return their old values as multiple values.

This may be more efficient than (shiftf place nil), because it only
sets PLACE when it is not already null.

Package

serapeum.

Source

control-flow.lisp.

Macro: nlet (name (&rest bindings) &body body)

Within BODY, bind NAME as a function, somewhat like LABELS, but with the guarantee that recursive calls to NAME will not grow the stack.

‘nlet’ resembles Scheme’s named let, and is used for the same purpose: writing loops using tail recursion. You could of course do this with ‘labels’ as well, at least under some Lisp implementations, but ‘nlet’ guarantees tail call elimination anywhere and everywhere.

(nlet rec ((i 1000000))
(if (= i 0)
0
(rec (1- i))))
=> 0

Beware: because of the way it is written (literally, a GOTO with arguments), ‘nlet’ is limited: self calls must be tail calls. That is, you cannot use ‘nlet’ for true recursion.

The name comes from ‘Let Over Lambda’, but this is a more careful implementation: the function is not bound while the initial arguments are being evaluated, and it is safe to close over the arguments.

Package

serapeum.

Source

iter.lisp.

Macro: nor (&rest forms)

Equivalent to (not (or ...)).

From Arc.

Package

serapeum.

Source

control-flow.lisp.

Macro: nsplice-seqf (place &rest keyword-args)

Modify macro for NSPLICE-seq.

Package

serapeum.

Source

sequences.lisp.

Macro: op (&body body)

GOO’s simple macro for positional lambdas.

An OP is like a lambda without an argument list. Within the body of the OP form, an underscore introduces a new argument.

(reduce (op (set-intersection _ _ :test #’equal)) sets)

You can refer back to each argument by number, starting with _1.

(funcall (op (+ _ _1)) 2) => 4

You can also use positional arguments directly:

(reduce (op (funcall _2 _1)) ...)

Argument lists can be sparse:

(apply (op (+ _1 _3 _5)) ’(1 2 3 4 5)) => 9

Note that OP with a single argument is equivalent to CONSTANTLY:

(funcall (op 1)) => 1

and that OP with a single placeholder is equivalent to IDENTITY:

(funcall (op _) 1) => 1

OP can also be used to define variadic functions by using _* as the placeholder. It is not necessary to use APPLY.

(apply (op (+ _*)) ’(1 2 3 4)) => 10

OP is intended for simple functions – one-liners. Parameters are extracted according to a depth-first walk of BODY. Macro expansion may, or may not, be done depending on the implementation; it should not be relied on. Lexical bindings may, or may not, shadow placeholders – again, it depends on the implementation. (This means, among other things, that nested use of ‘op’ is not a good idea.) Because of the impossibility of a truly portable code walker, ‘op’ will never be a true replacement for ‘lambda’. But even if it were possible to do better, ‘op’ would still only be suited for one-liners. If you need more than a one-liner, then you should be giving your parameters names.

(One thing you *can* count on is the ability to use ‘op’ with quasiquotes. If using placeholders inside quasiquotes does not work on your Lisp implementation, that’s a bug, not a limitation.)

Package

serapeum.

Source

op.lisp.

Macro: opf (place expr)

Like ‘(callf PLACE (op EXPR))’. From GOO.

Package

serapeum.

Source

op.lisp.

Macro: pop-assoc (key alist &rest args)

Like ‘assoc’ but, if there was a match, delete it from ALIST.

From Newlisp.

Package

serapeum.

Source

lists.lisp.

Macro: prependf (place &rest lists)

Modify-macro for prepend. Prepends LISTS to the PLACE designated by the first argument.

Package

serapeum.

Source

lists.lisp.

Macro: push-end (item place)

Destructively push ITEM to the end of PLACE.
Like ‘push’, but affects the last item rather than the first.

You may want to use ‘enq’ on a ‘queue’ instead.

From LispWorks.

Package

serapeum.

Source

lists.lisp.

Macro: push-end-new (item place &rest kwargs &key key test test-not)

Pushes ITEM to the end of place (like ‘push-end’) but only if it not already a member of PLACE (like ‘pushnew’).

For the use of KEY, TEST, and TEST-NOT, see ‘pushnew’.

Package

serapeum.

Source

lists.lisp.

Macro: receive (formals expr &body body)

Stricter version of ‘multiple-value-bind’.

Use ‘receive’ when you want to enforce that EXPR should return a certain number of values, or a minimum number of values.

If FORMALS is a proper list, then EXPR must return exactly as many values – no more and no less – as there are variables in FORMALS.

If FORMALS is an improper list (VARS . REST), then EXPR must return at least as many values as there are VARS, and any further values are bound, as a list, to REST.

Lastly, if FORMALS is a symbol, bind that symbol to all the values returned by EXPR, as if by ‘multiple-value-list’.

From Scheme (SRFI-8).

Package

serapeum.

Source

binding.lisp.

Macro: select (keyform &body clauses)

Like ‘case’, but with evaluated keys.

Note that, like ‘case’, ‘select’ interprets a list as the first element of a clause as a list of keys. To use a form as a key, you must add an extra set of parentheses.

(select 2
((+ 2 2) t))
=> T

(select 4
(((+ 2 2)) t))
=> T

From Zetalisp.

Package

serapeum.

Source

control-flow.lisp.

Macro: selector (keyform fn &body clauses)

Like ‘select’, but compare using FN.

Note that (unlike ‘case-using’), FN is not evaluated.

From Zetalisp.

Package

serapeum.

Source

control-flow.lisp.

Macro: shrinkf (place n)

Shrink the value in a place by a factor.

Package

serapeum.

Source

numbers.lisp.

Macro: sort-values (pred &rest values)

Sort VALUES with PRED and return as multiple values.

Equivalent to

(values-list (sort (list VALUES...) pred))

But with less consing, and potentially faster.

Package

serapeum.

Source

control-flow.lisp.

Macro: splice-seqf (place &rest keyword-args)

Modify macro for SPLICE-SEQ.

Package

serapeum.

Source

sequences.lisp.

Macro: static-let ((&rest bindings) &body body)

Like ‘let’, except the variables are only initialized once and retain their values between different invocations of ‘body’.

Every static binding is similar to a ‘let’ binding, except it can have additional keyword arguments:

- ‘type’ Denotes the type of the variable.
- ‘once’ If true, then binding initialization and mutation will be thread-safe.
- ‘flush’ If true, this binding will be flushable. Defaults to true. - ‘in’ Denotes the static binding group in which the binding will be placed for flushing. Defaults to the value of ‘*package’.
- ‘read-only’ If true, then the binding cannot be mutated with ‘setf’.

Static bindings can be flushed via ‘flush-static-binding-group’ and ‘flush-all-static-binding-groups’; the latter is automatically pushed into ‘uiop:*dump-image-hooks*’ by Serapeum.

An unflushable static binding will carry its value over into dumped Lisp binaries.

Package

serapeum.

Source

static-let.lisp.

Macro: static-let* ((&rest bindings) &body body)

Like ‘let*’, except the variables are only initialized once and retain their values between different invocations of ‘body’.

Every static binding is similar to a ‘let’ binding, except it can have additional keyword arguments:

- ‘type’ Denotes the type of the variable.
- ‘once’ If true, then binding initialization and mutation will be thread-safe.
- ‘flush’ If true, this binding will be flushable. Defaults to true. - ‘in’ Denotes the static binding group in which the binding will be placed for flushing. Defaults to the value of ‘*package’.
- ‘read-only’ If true, then the binding cannot be mutated with ‘setf’.

Static bindings can be flushed via ‘flush-static-binding-group’ and ‘flush-all-static-binding-groups’; the latter is automatically pushed into ‘uiop:*dump-image-hooks*’ by Serapeum.

An unflushable static binding will carry its value over into dumped Lisp binaries.

Package

serapeum.

Source

static-let.lisp.

Macro: static-load-time-value (form &optional read-only-p)

Like ‘load-time-value’, but signals an error if it cannot preserve identity.

On close reading of the standard, in a function that is evaluated but not compiled, it is permissible for implementations to repeatedly execute a ‘load-time-value’ form, and in fact some implementations do this (including, at the time of writing, ABCL, CLISP, Allegro and LispWorks).

When ‘static-load-time-value’ is compiled, it behaves exactly like ‘load-time-value’. Otherwise it conducts a run-time check to ensure
that ‘load-time-value’ preserves identity.

Package

serapeum.

Source

portability.lisp.

Macro: string-case (stringform &body clauses)

Efficient ‘case’-like macro with string keys.

Note that string matching is always case-sensitive.

This uses Paul Khuong’s ‘string-case’ macro internally.

Package

serapeum.

Source

control-flow.lisp.

Macro: string-ecase (stringform &body clauses)

Efficient ‘ecase’-like macro with string keys.

Note that string matching is always case-sensitive.

Cf. ‘string-case’.

Package

serapeum.

Source

control-flow.lisp.

Macro: summing (&body body)

Within BODY, bind ‘sum’ to a function that gathers numbers to sum.

If the first form in BODY is a literal number, it is used instead of 0 as the initial sum.

To see the running sum, call ‘sum’ with no arguments.

Return the total.

Package

serapeum.

Source

iter.lisp.

Macro: synchronized ((&optional object) &body body)

Run BODY holding a unique lock associated with OBJECT.
If no OBJECT is provided, run BODY as an anonymous critical section.

If BODY begins with a literal string, attach the string to the lock object created (as the argument to ‘bt:make-recursive-lock’).

Package

serapeum.

Source

threads.lisp.

Macro: tree-case (keyform &body cases)

A variant of ‘case’ optimized for when every key is an integer.

Comparison is done using ‘eql’.

Package

serapeum.

Source

tree-case.lisp.

Macro: tree-ecase (keyform &body clauses)

Like ‘tree-case’, but signals an error if KEYFORM does not match any of the provided cases.

Package

serapeum.

Source

tree-case.lisp.

Macro: typecase-of (type x &body clauses)

Like ‘etypecase-of’, but may, and must, have an ‘otherwise’ clause in case X is not of TYPE.

Package

serapeum.

Source

control-flow.lisp.

Macro: vref (vec index)

When used globally, same as ‘aref’.

Inside of a with-type-dispatch form, calls to ‘vref’ may be bound to different accessors, such as ‘char’ or ‘schar’, or ‘bit’ or ‘sbit’, depending on the type being specialized on.

Package

serapeum.

Source

types.lisp.

Macro: with-boolean ((&rest branches) &body body)

Establishes a lexical environment in which it is possible to use macroexpand-time branching. Within the lexical scope of
‘with-boolean’, it is possible to use ‘boolean-if’, ‘boolean-when’,
and ‘boolean-unless’ to conditionalize whether some forms are included
at compilation time. (You may also use ‘:if’, ‘:when’, or ‘:unless’
for brevity.)

The first argument must be a list of symbols which name variables. This macro will expand into a series of conditionals

Package

serapeum.

Source

types.lisp.

Macro: with-collector ((collector) &body body)

Within BODY, bind COLLECTOR to a function of one argument that accumulates all the arguments it has been called with in order, like the collect clause in ‘loop’, finally returning the collection.

To see the collection so far, call COLLECTOR with no arguments.

Note that this version binds COLLECTOR to a closure, not a macro: you can pass the collector around or return it like any other function.

Package

serapeum.

Source

iter.lisp.

Macro: with-collectors ((&rest collectors) &body body)

Like ‘with-collector’, with multiple collectors.
Returns the final value of each collector as multiple values.

(with-collectors (x y z)
(x 1)
(y 2)
(z 3))
=> ’(1) ’(2) ’(3)

Package

serapeum.

Source

iter.lisp.

Macro: with-hook-restart (&body body)
Package

serapeum.

Source

hooks.lisp.

Macro: with-item-key-function ((key &optional key-form) &body body)

For each of the most common key functions used in sequences, emit a copy of BODY with KEY bound to a local macro that calls KEY-FORM.

If current optimization declarations favor space over speed, or compilation speed over runtime speed, then BODY is only emitted once.

Package

serapeum.

Source

types.lisp.

Macro: with-member-test ((test-fn &key key test test-not) &body body)

Emit BODY multiple times with specialized, inline versions of ‘member’ bound to TEST-FN.

Package

serapeum.

Source

types.lisp.

Macro: with-open-files ((&rest args) &body body)

A simple macro to open one or more files providing the streams for the BODY. The ARGS is a list of ‘(stream filespec options*)‘ as supplied to WITH-OPEN-FILE.

Package

serapeum.

Source

files.lisp.

Macro: with-read-only-vars ((&rest vars) &body body)

Make VARS read-only within BODY.

That is, within BODY, each var in VARS is bound as a symbol macro, which expands into a macro whose setf expander, in turn, is defined to signal a warning at compile time, and an error at run time.

Depending on your Lisp implementation this may or may not do anything, and may or may not have an effect when used on special variables.

Package

serapeum.

Source

macro-tools.lisp.

Macro: with-simple-vector-dispatch ((&rest types) (var start end) &body body)

Like ‘with-vector-dispatch’ but on implementations that support it, the underlying simple vector of a displaced array is first dereferenced, so the type is guaranteed to be a subtype of simple-array (but not actually ‘simple-vector‘).

START and END are the offset of the original vector’s data in the array it is displaced to.

Package

serapeum.

Source

types.lisp.

Macro: with-standard-input-syntax (&body body)

Like ‘with-standard-io-syntax’, but only bind the variables that control the reader, not the printer.

This may be preferable to using ‘with-standard-io-syntax’ when loading data, as it will not effect how errors are printed, thus preserving debugging information.

Package

serapeum.

Source

reader.lisp.

Macro: with-string ((var &optional stream &key element-type) &body body)

Bind VAR to the character stream designated by STREAM.

STREAM is resolved like the DESTINATION argument to ‘format’: it can be any of t (for ‘*standard-output*’), nil (for a string stream), a string with a fill pointer, or a stream to be used directly.

When possible, it is a good idea for functions that build strings to take a stream to write to, so callers can avoid consing a string just to write it to a stream. This macro makes it easy to write such functions.

(defun format-x (x &key stream)
(with-string (s stream)
...))

Package

serapeum.

Source

strings.lisp.

Macro: with-string-dispatch ((&rest types) var &body body)

Like ‘with-subtype-dispatch’ with an overall type of ‘string’.

Package

serapeum.

Source

types.lisp.

Macro: with-subtype-dispatch (type (&rest subtypes) var &body body)

Like ‘with-type-dispatch’, but SUBTYPES must be subtypes of TYPE.

Furthermore, if SUBTYPES are not exhaustive, an extra clause will be added to ensure that TYPE itself is handled.

Package

serapeum.

Source

types.lisp.

Macro: with-thunk ((var &rest args) &body body)

A macro-writing macro for the ‘call-with-’ style.

In the ‘call-with-’ style of writing macros, the macro is simply a syntactic convenience that wraps its body in a thunk and a call to the function that does the actual work.

(defmacro with-foo (&body body)
‘(call-with-foo (lambda () ,@body)))

The ‘call-with-’ style has many advantages. Functions are easier to write than macros; you can change the behavior of a function without having to recompile all its callers; functions can be traced, appear in backtraces, etc.

But meanwhile, all those thunks are being allocated on the heap. Can we avoid this? Yes, but at a high cost in boilerplate: the closure has to be given a name (using ‘flet’) so it can be declared ‘dynamic-extent’.

(defmacro with-foo (&body body)
(with-gensyms (thunk)
‘(flet ((,thunk () ,@body))
(declare (dynamic-extent #’,thunk))
(call-with-foo #’,thunk))))

‘with-thunk’ avoids the boilerplate:

(defmacro with-foo (&body body)
(with-thunk (body)
‘(call-with-foo ,body)))

It is also possible to construct a "thunk" with arguments.

(with-thunk (body foo)
‘(call-with-foo ,body))
≡ ‘(flet ((,thunk (,foo)
,@body))
(declare (dynamic-extent #’,thunk))
(call-with-foo #’,thunk))

Someday this may have a better name.

Package

serapeum.

Source

macro-tools.lisp.

Macro: with-two-arg-test ((test) &body body)

Specialize BODY on the most common two-arg test functions.

Package

serapeum.

Source

types.lisp.

Macro: with-type-dispatch ((&rest types) var &body body)

A macro for writing fast sequence functions (among other things).

In the simplest case, this macro produces one copy of BODY for each type in TYPES, with the appropriate declarations to induce your Lisp to optimize that version of BODY for the appropriate type.

Say VAR is a string. With this macro, you can trivially emit optimized code for the different kinds of string that VAR might be. And
then (ideally) instead of getting code that dispatches on the type of VAR every time you call ‘aref’, you get code that dispatches on the type of VAR once, and then uses the appropriately specialized accessors. (But see ‘with-string-dispatch’.)

But that’s the simplest case. Using ‘with-type-dispatch’ also provides *transparent portability*. It examines TYPES to deduplicate types that are not distinct on the current Lisp, or that are shadowed by other provided types. And the expansion strategy may differ from Lisp to Lisp: ideally, you should not have to pay for good performance on Lisps with type inference with pointless code bloat on other Lisps.

There is an additional benefit for vector types. Around each version of BODY, the definition of ‘vref’ is shadowed to expand into an appropriate accessor. E.g., within a version of BODY where VAR is known to be a ‘simple-string’, ‘vref’ expands into ‘schar’.

Using ‘vref’ instead of ‘aref’ is obviously useful on Lisps that do not do type inference, but even on Lisps with type inference it can speed compilation times (compiling ‘aref’ is relatively slow on SBCL).

Within ‘with-type-dispatch’, VAR should be regarded as read-only.

Note that ‘with-type-dispatch’ is intended to be used around relatively expensive code, particularly loops. For simpler code, the gains from specialized compilation may not justify the overhead of the initial dispatch and the increased code size.

Note also that ‘with-type-dispatch’ is relatively low level. You may want to use one of the other macros in the same family, such as ‘with-subtype-dispatch’, ‘with-string-dispatch’, or so forth.

The design and implementation of ‘with-type-dispatch’ is based on a few sources. It replaces a similar macro formerly included in Serapeum, ‘with-templated-body’. One possible expansion is based on the ‘string-dispatch’ macro used internally in SBCL. But most of the credit should go to the paper "Fast, Maintable, and Portable Sequence Functions", by Irène Durand and Robert Strandh.

Package

serapeum.

Source

types.lisp.

Macro: with-vector-dispatch ((&rest types) var &body body)

Like ‘with-subtype-dispatch’ with an overall type of ‘vector’.

Package

serapeum.

Source

types.lisp.

Macro: without-recursion ((&key) &body body)

If BODY calls itself, at any depth, signal a (continuable) error of type ‘recursion-forbidden’.

Package

serapeum.

Source

control-flow.lisp.

Macro: ~> (needle &rest holes)

Threading macro from Clojure (by way of Racket).

Thread NEEDLE through HOLES, where each hole is either a
symbol (equivalent to ‘(hole needle)‘) or a list (equivalent to ‘(hole needle args...)‘).

As an extension, an underscore in the argument list is replaced with the needle, so you can pass the needle as an argument other than the first.

Package

serapeum.

Source

control-flow.lisp.

Macro: ~>> (needle &rest holes)

Like ‘~>’ but, by default, thread NEEDLE as the last argument instead of the first.

Package

serapeum.

Source

control-flow.lisp.


6.1.5 Compiler macros

Compiler Macro: @ (table key &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Compiler Macro: (setf @) (table key &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Compiler Macro: capped-fork (g h)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: capped-fork2 (g h)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: dict (&rest keys-and-values)
Package

serapeum.

Source

hash-tables.lisp.

Compiler Macro: do-nothing (&rest args)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: eq* (&rest xs)
Package

serapeum.

Source

control-flow.lisp.

Compiler Macro: eql* (&rest xs)
Package

serapeum.

Source

control-flow.lisp.

Compiler Macro: eqls (x)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: eqs (x)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: equal* (&rest xs)
Package

serapeum.

Source

control-flow.lisp.

Compiler Macro: equalp* (&rest xs)
Package

serapeum.

Source

control-flow.lisp.

Compiler Macro: equals (x)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: escape (string table &key start end stream)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: filter (pred seq &rest args &key count &allow-other-keys)

In the absence of COUNT, expand directly to ‘remove-if-not’.

Package

serapeum.

Source

sequences.lisp.

Compiler Macro: filter-map (fn list &rest lists)
Package

serapeum.

Source

lists.lisp.

Compiler Macro: flip (f)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: fmt (control-string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: fnil (fn &rest defaults)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: fork (g f h)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: fork2 (g f h)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: hook (f g)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: hook2 (f g)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: href (table &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Compiler Macro: (setf href) (table &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Compiler Macro: in (x &rest items)
Package

serapeum.

Source

lists.lisp.

Compiler Macro: interval (&rest args)
Package

serapeum.

Source

time.lisp.

Compiler Macro: juxt (&rest fns)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: keep (item seq &rest args &key test count &allow-other-keys)

In the absence of COUNT, expand directly to ‘remove’.

Package

serapeum.

Source

sequences.lisp.

Compiler Macro: make (class &rest initargs &key &allow-other-keys)
Package

serapeum.

Source

clos.lisp.

Compiler Macro: mapply (fn list &rest lists)
Package

serapeum.

Source

lists.lisp.

Compiler Macro: memq (item list)
Package

serapeum.

Source

lists.lisp.

Compiler Macro: mvconstantly (&rest values)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: mvfold (fn seq &rest seeds)

Optimize ‘mvfold’ with a fixed number of seeds.

Package

serapeum.

Source

sequences.lisp.

Compiler Macro: mvfoldr (fn seq &rest seeds)

Optimize ‘mvfoldr’ with a fixed number of seeds.

Package

serapeum.

Source

sequences.lisp.

Compiler Macro: no (x)
Package

serapeum.

Source

control-flow.lisp.

Compiler Macro: nth-arg (n)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: nub (seq &rest args &key test &allow-other-keys)
Package

serapeum.

Source

sequences.lisp.

Compiler Macro: octet-vector (&rest args)
Package

serapeum.

Source

octets.lisp.

Compiler Macro: of-length (length)
Package

serapeum.

Source

sequences.lisp.

Compiler Macro: once (fn)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: pad-end (vec len &optional pad)
Package

serapeum.

Source

vectors.lisp.

Compiler Macro: pad-start (vec len &optional pad)
Package

serapeum.

Source

vectors.lisp.

Compiler Macro: parse-float (string &rest args &key type &allow-other-keys)
Package

serapeum.

Source

numbers.lisp.

Compiler Macro: partial (fn &rest args)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: queue (&rest xs)

When there are no initial elements, use the bare constructor, allowing the queue to be declared dynamic-extent.

Package

serapeum.

Source

queue.lisp.

Compiler Macro: random-in-range (low high)

When LOW and HIGH are both constants, declare the type of the result.

Package

serapeum.

Source

numbers.lisp.

Compiler Macro: range (start &optional stop step)
Package

serapeum.

Source

range.lisp.

Compiler Macro: repeat-sequence (seq n)
Package

serapeum.

Source

sequences.lisp.

Compiler Macro: seq= (&rest xs)
Package

serapeum.

Source

sequences.lisp.

Compiler Macro: string$= (suffix string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string*= (substring string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string+ (&rest orig-args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string-contains-p (substring string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string-prefix-p (prefix string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string-suffix-p (suffix string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: string^= (prefix string &rest args)
Package

serapeum.

Source

strings.lisp.

Compiler Macro: true (x)
Package

serapeum.

Source

types.lisp.

Compiler Macro: unary->variadic (fn)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: variadic->unary (fn)
Package

serapeum.

Source

functions.lisp.

Compiler Macro: vect (&rest inits)
Package

serapeum.

Source

vectors.lisp.


6.1.6 Setf expanders

Setf Expander: (setf ensure) (place &rest newval)
Package

serapeum.

Source

control-flow.lisp.

Reader

ensure (macro).

Setf Expander: (setf ensure2) (place &rest newval)
Package

serapeum.

Source

control-flow.lisp.

Reader

ensure2 (macro).

Setf Expander: (setf slice) (sequence start &optional end)
Package

serapeum.

Source

sequences.lisp.

Reader

slice (function).

Setf Expander: (setf slot-value-safe) (instance slot-name &optional default)
Package

serapeum.

Source

clos.lisp.

Reader

slot-value-safe (function).


6.1.7 Ordinary functions

Function: @ (table &rest keys)

A concise way of doing lookups in (potentially nested) hash tables.

(@ (dict :x 1) :x) => 1
(@ (dict :x (dict :y 2)) :x :y) => 2

Package

serapeum.

Source

hash-tables.lisp.

Function: (setf @) (table key &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Function: append1 (list item)

Append an atom to a list.

(append1 list item)
≡ (append list (list item))

Package

serapeum.

Source

lists.lisp.

Function: array-index-row-major (array row-major-index)

The inverse of ARRAY-ROW-MAJOR-INDEX.

Given an array and a row-major index, return a list of subscripts.

(apply #’aref (array-index-row-major i))
≡ (array-row-major-aref i)

Package

serapeum.

Source

arrays.lisp.

Function: array= (x y)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: ascii-char-p (char)

Is CHAR an ASCII char?

Package

serapeum.

Source

strings.lisp.

Function: assocadr (item alist &rest args &key &allow-other-keys)

Like ‘assocdr’ for alists of proper lists.

(assocdr ’x ’((x 1))) => ’(1) (assocadr ’x ’((x 1))) => 1

Package

serapeum.

Source

lists.lisp.

Function: assocar (item alist &rest args &key &allow-other-keys)

Like (car (assoc ...))

Package

serapeum.

Source

lists.lisp.

Function: assocdr (item alist &rest args &key &allow-other-keys)

Like (cdr (assoc ...))

Package

serapeum.

Source

lists.lisp.

Function: assort (seq &key key test start end hash)

Return SEQ assorted by KEY.

(assort (iota 10)
:key (lambda (n) (mod n 3)))
=> ’((0 3 6 9) (1 4 7) (2 5 8))

Groups are ordered as encountered. This property means you could, in principle, use ‘assort’ to implement ‘remove-duplicates’ by taking the first element of each group:

(mapcar #’first (assort list))
≡ (remove-duplicates list :from-end t)

However, if TEST is ambiguous (a partial order), and an element could qualify as a member of more than one group, then it is not guaranteed that it will end up in the leftmost group that it could be a member of.

(assort ’(1 2 1 2 1 2) :test #’<=)
=> ’((1 1) (2 2 1 2))

The default algorithm used by ‘assort’ is, in the worst case, O(n) in the number of groups. If HASH is specified, then a hash table is used instead. However TEST must be acceptable as the ‘:test’ argument to ‘make-hash-table’.

Package

serapeum.

Source

sequences.lisp.

Function: base-path-join (base &rest suffixes)

Build a pathname by appending SUFFIXES to BASE.
For ‘path-join-base’, the path on the left is always the *base* and the path on the right is always the *suffix*. This means that even if the right hand path is absolute, it will be treated as if it were relative.

(base-path-join #p"foo/bar" #p"/baz")
=> #p"foo/bar/baz")

Also, a bare file name as a suffix does not override but is appended to the accumulated file name. This includes the extension.

(base-path-join #p"foo/bar" "baz")
=> #p"foo/barbaz")

(base-path-join #p"foo/bar.x" "baz.y")
=> #p"foo/bar.xbaz.y")

See ‘path-join’ for a similar function with more consistent behavior.

Package

serapeum.

Source

files.lisp.

Function: batches (seq n &key start end even)

Return SEQ in batches of N elements.

(batches (iota 11) 2)
=> ((0 1) (2 3) (4 5) (6 7) (8 9) (10))

If EVEN is non-nil, then SEQ must be evenly divisible into batches of size N, with no leftovers.

Package

serapeum.

Source

sequences.lisp.

Function: bestn (n seq pred &key key memo)

Partial sorting.
Equivalent to (take N (sort SEQ PRED)), but much faster, at least for small values of N.

With MEMO, use a decorate-sort-undecorate transform to ensure KEY is only ever called once per element.

The name is from Arc.

Package

serapeum.

Source

sequences.lisp.

Function: bisect-left (vec item pred &key key start end)

Return the index in VEC to insert ITEM and keep VEC sorted.

If a value equivalent to ITEM already exists in VEC, then the index returned is to the left of that existing item.

Package

serapeum.

Source

sequences.lisp.

Function: bisect-right (vec item pred &key key start end)

Return the index in VEC to insert ITEM and keep VEC sorted.

If a value equivalent to ITEM already exists in VEC, then the index returned is to the right of that existing item.

Package

serapeum.

Source

sequences.lisp.

Function: bits (int &key big-endian)

Return a bit vector of the bits in INT. Defaults to little-endian.

Package

serapeum.

Source

numbers.lisp.

Function: blankp (seq)

SEQ is either empty, or consists entirely of characters that satisfy ‘whitespacep’.

Package

serapeum.

Source

strings.lisp.

Function: bound-value (s &optional default)

If S is bound, return (values s t). Otherwise, return DEFAULT and nil.

Package

serapeum.

Source

symbols.lisp.

Function: (setf bound-value) (sym)

Like ‘(setf (symbol-value SYM) VAL)’, but raises an error if SYM is not already bound.

Package

serapeum.

Source

symbols.lisp.

Function: box (unbox)

Box a value.

Package

serapeum.

Source

box.lisp.

Function: capped-fork (g h)

J’s capped fork (monadic).

Like a monadic fork, but F is omitted.

Effectively the composition of G and H.

Package

serapeum.

Source

functions.lisp.

Function: capped-fork2 (g h)

J’s capped fork (dyadic).

Like a dyadic fork, but F is omitted.

Package

serapeum.

Source

functions.lisp.

Function: car+cdr (list)

Given LIST, return its car and cdr as two values.

Package

serapeum.

Source

trees.lisp.

Function: car-safe (x)

The car of X, or nil if X is not a cons.

This is different from Alexandria’s ‘ensure-car‘, which returns the atom.

(ensure-car ’(1 . 2)) => 1
(car-safe ’(1 . 2)) => 1
(ensure-car 1) => 1
(car-safe 1) => nil

From Emacs Lisp.

Package

serapeum.

Source

lists.lisp.

Function: case-failure (expr keys)

Signal an error of type ‘case-failure’.

Package

serapeum.

Source

macro-tools.lisp.

Function: cdr-safe (x)

The cdr of X, or nil if X is not a cons. From Emacs Lisp.

Package

serapeum.

Source

lists.lisp.

Function: chomp (string &optional suffixes)

If STRING ends in one of SUFFIXES, remove that suffix.

SUFFIXES defaults to a Lisp newline, a literal line feed, a literal carriage return, or a literal carriage return followed by a literal line feed.

Takes care that the longest suffix is always removed first.

Package

serapeum.

Source

strings.lisp.

Function: class-name-of (x)

The class name of the class of X.

Package

serapeum.

Source

clos.lisp.

Function: class-name-safe (x)

The class name of the class of X.
If X is a class, the name of the class itself.

Package

serapeum.

Source

clos.lisp.

Function: clear-queue (queue)

Return QUEUE’s contents and reset it.

Package

serapeum.

Source

queue.lisp.

Function: collapse-duplicates (seq &key key test)

Remove adjacent duplicates in SEQ.

Repetitions that are not adjacent are left alone.

(remove-duplicates ’(1 1 2 2 1 1)) => ’(1 2) (collapse-duplicates ’(1 1 2 2 1 1)) => ’(1 2 1)

Package

serapeum.

Source

sequences.lisp.

Function: collapse-whitespace (string &key space stream)

Collapse runs of whitespace in STRING.
Each run of space, newline, and other whitespace characters is replaced by a single space character (or SPACE, if that is specified).

Package

serapeum.

Source

strings.lisp.

Function: concat (&rest strings)

Abbreviation for (concatenate ’string ...).

From Emacs Lisp.

Package

serapeum.

Source

strings.lisp.

Function: copy-firstn (list n)

Like COPY-LIST, but copies at most the first N conses of LIST. Handles cyclic lists gracefully.

Package

serapeum.

Source

sequences.lisp.

Function: copy-queue (queue)

Copy QUEUE as another queue.

Package

serapeum.

Source

queue.lisp.

Function: count-cpus (&key default online memoize)

Try very hard to return a meaningful count of CPUs.
If ONLINE is non-nil, try to return only the active CPUs.

The second value is T if the number of processors could be queried, ‘nil’ otherwise.

If MEMOIZE is non-nil (default), then memoize the result. Calling with MEMOIZE nil clears any memoized results.

Package

serapeum.

Source

threads.lisp.

Function: date-leap-year-p (year)

Is YEAR a leap year in the Gregorian calendar?

Package

serapeum.

Source

time.lisp.

Function: deconstruct (x)

If X is a type defined with ‘defconstructor’, return its slots as multiple values.

Package

serapeum.

Source

defining-types.lisp.

Function: define-hook (hook-type name &key object handlers disabled-handlers combination)

Return a globally-accessible hook.
The hook can be accessed with ‘find-hook’ at (list NAME OBJECT).

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: delete-from-hash-table (table &rest keys)

Return TABLE with KEYS removed (as with ‘remhash’). Cf. ‘delete-from-plist’ in Alexandria.

Package

serapeum.

Source

hash-tables.lisp.

Function: delq (item list)

Like (delete ... :test #’eq), but only for lists.

Almost always used as (delq nil ...).

Package

serapeum.

Source

lists.lisp.

Function: deltas (seq &optional fn)

Return the successive differences in SEQ.

(deltas ’(4 9 -5 1 2))
=> ’(4 5 -14 6 1)

Note that the first element of SEQ is also the first element of the return value.

By default, the delta is the difference, but you can specify another function as a second argument:

(deltas ’(2 4 2 6) #’/)
=> ’(2 2 1/2 3)

From Q.

Package

serapeum.

Source

sequences.lisp.

Function: deq (queue)

Remove item from the front of the QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: dict (&rest keys-and-values)

A concise constructor for hash tables.

(gethash :c (dict :a 1 :b 2 :c 3)) => 3, T

By default, return an ’equal hash table containing each successive pair of keys and values from KEYS-AND-VALUES.

If the number of KEYS-AND-VALUES is odd, then the first argument is understood as the test.

(gethash "string" (dict "string" t)) => t
(gethash "string" (dict ’eq "string" t)) => nil

Note that ‘dict’ can also be used for destructuring (with Trivia).

(match (dict :x 1)
((dict :x x) x))
=> 1

Package

serapeum.

Source

hash-tables.lisp.

Function: dict* (dict &rest args)

Merge new bindings into DICT.
Roughly equivalent to ‘(merge-tables DICT (dict args...))’.

Package

serapeum.

Source

hash-tables.lisp.

Function: distinct (&key key test synchronized)

Return a closure returning only values it has not seen before.

(defalias test (distinct))
(test ’foo) => foo, t
(test ’foo) => nil, nil

The second value is T when the value is distinct.

TEST must be a valid test for a hash table.

This has many uses, for example:

(count-if (distinct) seq)
≡ (length (remove-duplicates seq))

If SYNCHRONIZED is non-nil, then ‘distinct’ can safely be used from multiple threads. Otherwise it is not thread-safe.

Note the closure returned by ‘distinct’ changes how it tracks unique items based on the number of items it is tracking, so it is suitable for all sizes of set.

Package

serapeum.

Source

functions.lisp.

Function: do-nothing (&rest args)

Do nothing and return nothing.
This function is meant as a placeholder for a function argument.

From LispWorks.

Package

serapeum.

Source

functions.lisp.

Function: drop (n seq)

Return all but the first N elements of SEQ.
The sequence returned is a new sequence of the same type as SEQ.

If N is greater than the length of SEQ, returns an empty sequence of the same type.

If N is negative, then |N| elements are dropped from the end of SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: drop-prefix (prefix seq &key test)

If SEQ starts with PREFIX, remove it.

Package

serapeum.

Source

sequences.lisp.

Function: drop-suffix (suffix seq &key test)

If SEQ ends with SUFFIX, remove it.

Package

serapeum.

Source

sequences.lisp.

Function: drop-until (pred seq)

Like ‘drop-while’ with the complement of PRED.

Package

serapeum.

Source

sequences.lisp.

Function: drop-while (pred seq)

Return the largest possible suffix of SEQ for which PRED returns false when called on the first element.

Package

serapeum.

Source

sequences.lisp.

Function: dsu-sort (seq fn &key key stable)

Decorate-sort-undecorate using KEY.
Useful when KEY is an expensive function (e.g. database access).

Package

serapeum.

Source

sequences.lisp.

Function: dsu-sort-new (seq fn &key key stable)

Like ‘dsu-sort’, but returning a new vector.

Package

serapeum.

Source

sequences.lisp.

Function: dynamic-closure (symbols fn)

Create a dynamic closure.

Some ancient Lisps had closures without lexical binding. Instead, you could "close over" pieces of the current dynamic environment. When the resulting closure was called, the symbols closed over would be bound to their storage at the time the closure was created. These bindings would persist through subsequent invocations and could be mutated. The result was something between a closure and a continuation.

This particular piece of Lisp history is worth reviving, I think, if only for use with threads. For example, to start a thread and propagate the current value of ‘*standard-output*’:

(bt:make-thread (dynamic-closure ’(*standard-output*) (lambda ...))) = (let ((temp *standard-output*))
(bt:make-thread
(lambda ...
(let ((*standard-output* temp))
...))))

Package

serapeum.

Source

functions.lisp.

Function: each (fn array &key element-type)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: each-left (array fn fixed &key element-type)

The left refers to the position of the array.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: each-right (fixed fn array &key element-type)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: efface (item list)

Destructively remove only the first occurence of ITEM in LIST.

From Lisp 1.5.

Package

serapeum.

Source

lists.lisp.

Function: ellipsize (string n &key ellipsis)

If STRING is longer than N, truncate it and append ELLIPSIS.

Note that the resulting string is longer than N by the length of ELLIPSIS, so if N is very small the string may come out longer than it started.

(ellipsize "abc" 2)
=> "ab..."

From Arc.

Package

serapeum.

Source

strings.lisp.

Function: enq (item queue)

Insert ITEM at the end of QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: ensure-prefix (prefix seq &key test)

Return a sequence like SEQ, but starting with PREFIX. If SEQ already starts with PREFIX, return SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: ensure-suffix (seq suffix &key test)

Return a sequence like SEQ, but ending with SUFFIX. If SEQ already ends with SUFFIX, return SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: ensure-vector (x)

If X is a vector, return it.
Otherwise, return a vector with X as its sole element.

Package

serapeum.

Source

vectors.lisp.

Function: eq* (&rest xs)

Variadic version of ‘eq’.

With no arguments, return T.

With one argument, return T.

With two arguments, same as ‘eq’.

With three or more arguments, return T only if all of XS are equivalent under ‘eq’.

Has a compiler macro, so there is no loss of efficiency relative to writing out the tests by hand.

Package

serapeum.

Source

control-flow.lisp.

Function: eql* (&rest xs)

Variadic version of ‘eql’.

With no arguments, return T.

With one argument, return T.

With two arguments, same as ‘eql’.

With three or more arguments, return T only if all of XS are equivalent under ‘eql’.

Has a compiler macro, so there is no loss of efficiency relative to writing out the tests by hand.

Package

serapeum.

Source

control-flow.lisp.

Function: eqls (x)

Return a one-argument function that tests if its argument is ‘eql’ to X.

Package

serapeum.

Source

functions.lisp.

Function: eqs (x)

Return a one-argument function that tests if its argument is ‘eq’ to X.

Package

serapeum.

Source

functions.lisp.

Function: equal* (&rest xs)

Variadic version of ‘equal’.

With no arguments, return T.

With one argument, return T.

With two arguments, same as ‘equal’.

With three or more arguments, return T only if all of XS are equivalent under ‘equal’.

Has a compiler macro, so there is no loss of efficiency relative to writing out the tests by hand.

Package

serapeum.

Source

control-flow.lisp.

Function: equalp* (&rest xs)

Variadic version of ‘equalp’.

With no arguments, return T.

With one argument, return T.

With two arguments, same as ‘equalp’.

With three or more arguments, return T only if all of XS are equivalent under ‘equalp’.

Has a compiler macro, so there is no loss of efficiency relative to writing out the tests by hand.

Package

serapeum.

Source

control-flow.lisp.

Function: equals (x)

Return a one-argument function that tests if its argument is ‘equal’ to X.

Package

serapeum.

Source

functions.lisp.

Function: escape (string table &key start end stream)

Write STRING to STREAM, escaping with TABLE.

TABLE should be either a hash table, with characters for keys and strings for values, or a function that takes a character and returns (only) either a string or null.

That is, the signature of TABLE should be:

(function (character) (or string null))

where ‘nil’ means to pass the character through unchanged.

STREAM can be used to specify a stream to write to, like the first argument to ‘format’. The default behavior, with no stream specified, is to return a string.

Package

serapeum.

Source

strings.lisp.

Function: eval-if-constant (form &optional env)

Try to reduce FORM to a constant, using ENV.
If FORM cannot be reduced, return it unaltered.

Also return a second value, T if the form could be reduced to a constant, or nil otherwise. (Note that the second value may be T if FORM was already a constant; think of it as a "green light" to treat the value as a constant.)

This is equivalent to testing if FORM is constant, then evaluating it, except that FORM is macro-expanded in ENV (taking compiler macros into account) before doing the test.

Note that this function may treat a form as constant which would not be recognized as such by ‘constantp’, because we also expand compiler macros.

Package

serapeum.

Source

macro-tools.lisp.

Function: exe (p)

If P, a pathname designator, has no extension, then, on Windows only, add an extension of ‘.exe‘.

Package

serapeum.

Source

files.lisp.

Function: expand-macro (form &optional env)

Like ‘macroexpand-1’, but also expand compiler macros. From Swank.

Package

serapeum.

Source

macro-tools.lisp.

Function: expand-macro-recursively (form &optional env)

Like ‘macroexpand’, but also expand compiler macros. From Swank.

Package

serapeum.

Source

macro-tools.lisp.

Function: expect-form-list (exp)

Sanity-check EXP, a macro expansion, assuming it is supposed to be a series of forms suitable for splicing into a progn (implicit or explicit.)

Package

serapeum.

Source

macro-tools.lisp.

Function: expect-single-form (exp)

Sanity-check EXP, a macro expansion, assuming it is supposed to be a single form suitable for inserting intact.

Package

serapeum.

Source

macro-tools.lisp.

Function: export-only (export/s &optional package)

Like EXPORT, but unexport any other, existing exports.

Package

serapeum.

Source

packages.lisp.

Function: extrema (seq pred &key key start end)

Like EXTREMUM, but returns both the minimum and the maximum (as two values).

(extremum (iota 10) #’>) => 9
(extrema (iota 10) #’>) => 9, 0

Package

serapeum.

Source

sequences.lisp.

Function: file-size (file &key element-type)

The size of FILE, in units of ELEMENT-TYPE (defaults to bytes).

The size is computed by opening the file and getting the length of the resulting stream.

If all you want is to read the file’s size in octets from its metadata, consider ‘trivial-file-size:file-size-in-octets’ instead.

Package

serapeum.

Source

files.lisp.

Function: file-size-human-readable (file &key flavor space suffix stream)

Format the size of FILE (in octets) using ‘format-file-size-human-readable’. The size of file is found by ‘trivial-file-size:file-size-in-octets’.

Inspired by the function of the same name in Emacs.

Package

serapeum.

Source

files.lisp.

Function: file= (file1 file2 &key buffer-size)

Compare FILE1 and FILE2 octet by octet, (possibly) using buffers of BUFFER-SIZE.

Package

serapeum.

Source

files.lisp.

Function: filter (pred seq &rest args &key count &allow-other-keys)

Almost, but not quite, an alias for ‘remove-if-not’.

The difference is the handling of COUNT: for ‘filter’, COUNT is the number of items to *keep*, not remove.

(remove-if-not #’oddp ’(1 2 3 4 5) :count 2)
=> ’(1 3 5)

(filter #’oddp ’(1 2 3 4 5) :count 2)
=> ’(1 3)

Package

serapeum.

Source

sequences.lisp.

Function: filter-map (fn list &rest lists)

Map FN over (LIST . LISTS) like ‘mapcar’, but omit empty results.

(filter-map fn ...)
≅ (remove nil (mapcar fn ...))

Package

serapeum.

Source

lists.lisp.

Function: find-class-safe (x &optional env)

The class designated by X.
If X is a class, it designates itself.

Package

serapeum.

Source

clos.lisp.

Function: find-external-symbol (string package &key error)

If PACKAGE exports a symbol named STRING, return it.
If PACKAGE does not contain such a symbol, or if the symbol is not exported, then ‘nil’ is returned, unless ERROR is non-nil, in which case an error is signaled.

Package

serapeum.

Source

packages.lisp.

Function: find-handler (handler-or-name handlers)

Return handler matching HANDLER-OR-NAME in HANDLERS sequence.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: find-hook (name &optional object)

Return the global hook with name NAME associated to OBJECT, if provided. The following examples return different hooks:
- (find-hook ’foo-hook)
- (find-hook ’foo-hook ’bar-class)
- (find-hook ’foo-hook (make-instance ’bar-class))

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: find-keyword (string)

If STRING has been interned as a keyword, return it.

Like ‘make-keyword’, but preferable in most cases, because it doesn’t intern a keyword – which is usually both unnecessary and unwise.

Package

serapeum.

Source

symbols.lisp.

Function: firstn (n list)

The first N elements of LIST, as a fresh list:

(firstn 4 (iota 10))
=> (0 1 2 4)

(I do not know why this extremely useful function did not make it into Common Lisp, unless it was deliberately left out as an exercise for Maclisp users.)

Package

serapeum.

Source

lists.lisp.

Function: fixnump (n)

Same as ‘(typep N ’fixnum)’.

Package

serapeum.

Source

numbers.lisp.

Function: flip (f)

Flip around the arguments of a binary function.

That is, given a binary function, return another, equivalent function that takes its two arguments in the opposite order.

From Haskell.

Package

serapeum.

Source

functions.lisp.

Function: flip-hash-table (table &rest hash-table-args &key filter key test size rehash-size rehash-threshold)

Return a table like TABLE, but with keys and values flipped.

(gethash :y (flip-hash-table (dict :x :y)))
=> :x, t

TEST allows you to filter which keys to set.

(def number-names (dictq 1 one 2 two 3 three))

(def name-numbers (flip-hash-table number-names))
(def name-odd-numbers (flip-hash-table number-names :filter #’oddp))

(gethash ’two name-numbers) => 2, t
(gethash ’two name-odd-numbers) => nil, nil

KEY allows you to transform the keys in the old hash table.

(def negative-number-names (flip-hash-table number-names :key #’-)) (gethash ’one negative-number-names) => -1, t

KEY defaults to ‘identity’.

Package

serapeum.

Source

hash-tables.lisp.

Function: float-precision-contagion (&rest ns)

Perform numeric contagion on the elements of NS.

That is, if any element of NS is a float, then every number in NS will be returned as "a float of the largest format among all the floating-point arguments to the function".

This does nothing but numeric contagion: the number of arguments returned is the same as the number of arguments given.

Package

serapeum.

Source

numbers.lisp.

Function: flush-all-static-binding-groups ()

Flush all static binding values in ALL binding groups and restore them to their uninitialized state, forcing any initforms for these static bindings to be reevaluated whenever control next reaches the respective ‘static-let’/‘static-let*’. Returns the number of live bindings flushed that way.

This operation is unsafe to perform while any other threads are trying to access these bindings; proper synchronization is left to the user. In addition, this operation will clear ALL values, including these which were not bound by the programmer. This can lead to unintended behavior, hence, a continuable error is signaled unless Lisp is running single-threaded.

This function is useful e.g. when deploying Lisp binaries in order to not include static binding values in the resulting Lisp image.

Note that a static binding that was created as ‘:flushablep nil’ will not be affected by this operation.

Package

serapeum.

Source

static-let.lisp.

Function: flush-static-binding-group (group &key are-you-sure-p)

Flushes all static binding values in binding group ‘group’ and restores them to their uninitialized state, forcing any initforms for these static bindings to be reevaluated whenever control next reaches the respective ‘static-let’/‘static-let*’. Returns the number of live bindings flushed that way.

This operation is unsafe to perform while any other threads are trying to access these bindings; proper synchronization is left to the user. Therefore, a continuable error is signaled unless Lisp is running single-threaded or ‘are-you-sure-p’ is true.

Note that a static binding that was created as ‘:flushablep nil’ will not be affected by this operation.

Package

serapeum.

Source

static-let.lisp.

Function: fmt (control-string &rest args)

A cousin of ‘format‘ expressly for fast formatting of strings.

Like (format nil ...), binding ‘*print-pretty*’ to ‘nil’, which in some Lisps means a significant increase in speed.

Has a compiler macro with ‘formatter’.

Package

serapeum.

Source

strings.lisp.

Function: fnil (fn &rest defaults)

Return a function that ORs its arguments with DEFAULTS.

If the first argument is nil, then the first default in DEFAULTS is used instead; if the second argument is nil, then the second default in DEFAULTS is used instead; and so on until we run out of DEFAULTS.

The minimum arity is equal to the length of DEFAULTS.

This has a compiler macro for reasonable efficiency.

From Clojure.

Package

serapeum.

Source

functions.lisp.

Function: fork (g f h)

Monadic fork.

The monadic fork of f, g, and h is defined as

(f g h) y <-> (f y) g (h y)

The usual example of a monadic fork is defining the mean. Assuming a ‘sum’ function defined as

(defun sum (xs)
(reduce #’+ xs))

you can write a (numerically unstable) ‘mean’ using ‘fork’.

(fork #’/ #’sum #’length)
(funcall * ’(1.0 2.0 3.0 4.0))
=> 2.5

From J.

Package

serapeum.

Source

functions.lisp.

Function: fork2 (g f h)

Dyadic fork.

The dyadic fork of f, g, and h is defined as:

x (f g h) y <-> (x f y) g (x h y)

For example, say you wanted a "plus or minus" operator. Given numbers x and y, it returns a list of x+y and x-y. This can easily be written as a dyadic fork.

(fork2 #’list #’+ #’-)
(funcall * 10 2)
=> ’(12 8)

From J.

Package

serapeum.

Source

functions.lisp.

Function: format-file-size-human-readable (stream file-size &key flavor space suffix)

Write FILE-SIZE, a file size in bytes, to STREAM, in human-readable form.

STREAM is interpreted as by ‘format’.

If FLAVOR is nil, kilobytes are 1024 bytes and SI prefixes are used.

If FLAVOR is ‘:si’, kilobytes are 1000 bytes and SI prefixes are used.

If FLAVOR is ‘:iec’, kilobytes are 1024 bytes and IEC prefixes (Ki, Mi, etc.) are used.

If SPACE is non-nil, include a space between the number and the prefix. (Defaults to T if FLAVOR is ‘:si’.)

SUFFIX is the suffix to use; defaults to B if FLAVOR is ‘:iec’, otherwise empty.

Package

serapeum.

Source

files.lisp.

Function: format-human-size (stream size &key flavor space)

Write SIZE to STREAM, in human-readable form.

STREAM is interpreted as by ‘format’.

If FLAVOR is ‘:si’ (the default) the base is 1000 and SI prefixes are used.

If FLAVOR is ‘:file’, the base is 1024 and SI prefixes are used.

If FLAVOR is ‘:iec’, the base is 1024 bytes and IEC prefixes (Ki, Mi, etc.) are used.

If SPACE is non-nil, include a space between the number and the
prefix. (Defaults to T if FLAVOR is ‘:si’.)

Package

serapeum.

Source

units.lisp.

Function: frequencies (seq &rest hash-table-args &key key &allow-other-keys)

Return a hash table with the count of each unique item in SEQ. As a second value, return the length of SEQ.

From Clojure.

Package

serapeum.

Source

sequences.lisp.

Function: front (queue)

The first element in QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: (setf front) (queue)
Package

serapeum.

Source

queue.lisp.

Function: fuel (level)

Return a function to count ’fuel’ consumption down from the initial level.

The function takes one argument and subtracts its value from the current fuel level.

The two return values are a boolean indicating whether the available fuel has been exceeded followed by the current fuel level (which may be negative.)

Package

serapeum.

Source

functions.lisp.

Function: gcp (seqs &key test)

The greatest common prefix of SEQS.

If there is no common prefix, return NIL.

Package

serapeum.

Source

sequences.lisp.

Function: gcs (seqs &key test)

The greatest common suffix of SEQS.

If there is no common suffix, return NIL.

Package

serapeum.

Source

sequences.lisp.

Function: get-unix-time ()

The current time as a count of seconds from the Unix epoch.

Package

serapeum.

Source

time.lisp.

Function: grow (n by)

Increase N by a factor.

Package

serapeum.

Source

numbers.lisp.

Function: halves (seq &optional split)

Return, as two values, the first and second halves of SEQ.
SPLIT designates where to split SEQ; it defaults to half the length, but can be specified.

If SPLIT is not provided, the length is halved using ‘ceiling’ rather than ‘truncate’. This is on the theory that, if SEQ is a single-element list, it should be returned unchanged.

If SPLIT is negative, then the split is determined by counting |split| elements from the right (or, equivalently, length+split elements from the left). Note that providing a negative argument to a list works similarly to ‘butlast’ (a single traversal).

Package

serapeum.

Source

sequences.lisp.

Function: hash-fold (fn init hash-table)

Reduce TABLE by calling FN with three values: a key from the hash table, its value, and the return value of the last call to FN. On the first call, INIT is supplied in place of the previous value.

From Guile.

Package

serapeum.

Source

hash-tables.lisp.

Function: hash-table-function (hash-table &key read-only strict key-type value-type strict-types)

Return a function for accessing HASH-TABLE.

Calling the function with a single argument is equivalent to ‘gethash’ against a copy of HASH-TABLE at the time HASH-TABLE-FUNCTION was called.

(def x (make-hash-table))

(funcall (hash-table-function x) y)
≡ (gethash y x)

If READ-ONLY is nil, then calling the function with two arguments is equivalent to ‘(setf (gethash ...))’ against HASH-TABLE.

If STRICT is non-nil, then the function signals an error if it is called with a key that is not present in HASH-TABLE. This applies to setting keys, as well as looking them up.

The function is able to restrict what types are permitted as keys and values. If KEY-TYPE is specified, an error will be signaled if an attempt is made to get or set a key that does not satisfy KEY-TYPE. If VALUE-TYPE is specified, an error will be signaled if an attempt is made to set a value that does not satisfy VALUE-TYPE. However, the hash table provided is *not* checked to ensure that the existing pairings KEY-TYPE and VALUE-TYPE – not unless STRICT-TYPES is also specified.

Package

serapeum.

Source

hash-tables.lisp.

Function: hash-table-predicate (hash-table)

Return a predicate for membership in HASH-TABLE.
The predicate returns the same two values as ‘gethash’, but in the opposite order.

Package

serapeum.

Source

hash-tables.lisp.

Function: hash-table-set (table &key strict test key)

Return the set denoted by TABLE.
Given STRICT, check that the table actually denotes a set.

Without STRICT, equivalent to ‘hash-table-values’.

Package

serapeum.

Source

hash-tables.lisp.

Function: hash-table-test-p (test)

Is TEST a valid hash table test?

Package

serapeum.

Source

hash-tables.lisp.

Function: heap-extract (heap i)

Destructively extract the element in heap at index I, counting from the greatest element.

Package

serapeum.

Source

heap.lisp.

Function: heap-extract-all (heap)

Destructively extract all the elements of HEAP from greatest to least.

Package

serapeum.

Source

heap.lisp.

Function: heap-extract-maximum (heap)

Destructively extract the greatest element of HEAP.

Package

serapeum.

Source

heap.lisp.

Function: heap-insert (heap new-item)

Insert NEW-ITEM into HEAP.

Package

serapeum.

Source

heap.lisp.

Function: heap-maximum (heap)

Return (without extracting) the greatest element in HEAP.

Package

serapeum.

Source

heap.lisp.

Function: hook (f g)

Monadic hook.
From J.

The hook of f is defined as f(y,g(y)).

For example, you can use a hook to test whether a number is an integer, by asking whether it is equal to its own floor.

(hook #’= #’floor)
(funcall * 2.0)
=> T

AKA Schoenfinkel’s S combinator.

Package

serapeum.

Source

functions.lisp.

Function: hook2 (f g)

Dyadic hook.

The usual (only?) example of a dyadic hook is an ‘hour’ function that takes an hour and a count of minutes and returns a fractional count of hours.

(hook2 #’+ (partial (flip #’/) 60))
(funcall * 3.0 15.0)
=> 3.25

From J.

Package

serapeum.

Source

functions.lisp.

Function: href (table &rest keys)

A concise way of doing lookups in (potentially nested) hash tables.

(href (dict :x 1) :x) => 1
(href (dict :x (dict :y 2)) :x :y) => 2

Package

serapeum.

Source

hash-tables.lisp.

Function: (setf href) (table &rest keys)
Package

serapeum.

Source

hash-tables.lisp.

Function: href-default (default table &rest keys)

Like ‘href’, with a default.
As soon as one of KEYS fails to match, DEFAULT is returned.

Package

serapeum.

Source

hash-tables.lisp.

Function: human-size-formatter (size &key flavor space)

Auxiliary function for formatting quantities human-readably. Returns two values: a format control and a list of arguments.

This can be used to integrate the human-readable printing of quantities into larger format control strings using the recursive processing format directive (~?):

(multiple-value-bind (control args)
(human-size-formatter size)
(format t "~?" control args))

Package

serapeum.

Source

units.lisp.

Function: in (x &rest items)

Is X equal to any of ITEMS?

‘(in x xs...)‘ is always equivalent to ‘(and (member x xs :test equal) t)‘, but ‘in‘ can sometimes compile to more efficient code when the candidate matches are constant.

From Arc.

Package

serapeum.

Source

lists.lisp.

Function: intersectionp (list1 list2 &key key test test-not)

Return T if LIST1 and LIST2 intersect.
Equivalent to ‘(and (intersection list1 list2) t)‘, without intermediate consing.

Two empty lists are not considered to intersect.

Package

serapeum.

Source

lists.lisp.

Function: intersperse (new-elt seq)

Return a sequence like SEQ, but with NEW-ELT inserted between each element.

Package

serapeum.

Source

sequences.lisp.

Function: interval (&key seconds minutes hours days weeks months years month-days year-days)

A verbose but readable way of specifying intervals in seconds.

Intended as a more readable alternative to idioms
like (let ((day-in-seconds #.(* 24 60 60))) ...)

Has a compiler macro.

Package

serapeum.

Source

time.lisp.

Function: juxt (&rest fns)

Clojure’s ‘juxt’.

Return a function of one argument, which, in turn, returns a list where each element is the result of applying one of FNS to the argument.

It’s actually quite simple, but easier to demonstrate than to explain. The classic example is to use ‘juxt‘ to implement ‘partition‘:

(defalias partition* (juxt #’filter #’remove-if))
(partition* #’evenp ’(1 2 3 4 5 6 7 8 9 10))
=> ’((2 4 6 8 10) (1 3 5 7 9))

The general idea is that ‘juxt‘ takes things apart.

Package

serapeum.

Source

functions.lisp.

Function: keep (item seq &rest args &key test from-end key count &allow-other-keys)

Almost, but not quite, an alias for ‘remove‘ with ‘:test-not‘ instead of ‘:test‘.

The difference is the handling of COUNT. For keep, COUNT is the number of items to keep, not remove.

(remove ’x ’(x y x y x y) :count 2)
=> ’(y y x y)

(keep ’x ’(x y x y x y) :count 2)
=> ’(x x)

‘keep’ becomes useful with the KEY argument:

(keep ’x ((x 1) (y 2) (x 3)) :key #’car)
=> ’((x 1) (x 3))

Package

serapeum.

Source

sequences.lisp.

Function: leaf-map (fn tree)

Call FN on each leaf of TREE.
Return a new tree possibly sharing structure with TREE.

Package

serapeum.

Source

trees.lisp.

Function: leaf-walk (fun tree)

Call FUN on each leaf of TREE.

Package

serapeum.

Source

trees.lisp.

Function: length< (&rest seqs)

Is each length-designator in SEQS shorter than the next? A length designator may be a sequence or an integer.

Package

serapeum.

Source

sequences.lisp.

Function: length<= (&rest seqs)

Is each length-designator in SEQS as long or shorter than the next? A length designator may be a sequence or an integer.

Package

serapeum.

Source

sequences.lisp.

Function: length> (&rest seqs)

Is each length-designator in SEQS longer than the next? A length designator may be a sequence or an integer.

Package

serapeum.

Source

sequences.lisp.

Function: length>= (&rest seqs)

Is each length-designator in SEQS longer or as long as the next? A length designator may be a sequence or an integer.

Package

serapeum.

Source

sequences.lisp.

Function: lines (string &key eol-style honor-crlf keep-eols count)

Return a list of the lines in STRING, stripped of any EOL characters
and including the last nonempty line even if it has no EOL characters, or NIL if STRING is empty or NIL.

If COUNT is provided, only the first COUNT lines are returned.

EOL-STYLE can be one of the following:

- NIL, the default, which means split on #\Newline.
- :CR, which means split on CR, i.e., #\Return.
- :LF, which means split on LF, i.e., #\Linefeed.
- :CRLF, which means split on CRLF, i.e., #\Return followed by #\Linefeed.
- :ASCII, which means split on any of CR, LF, and CRLF.
- :UNICODE, which means split on any of the newlines described in Section 5.8, "Newline Guidelines", of the Unicode Standard,
available at http://www.unicode.org/versions/latest/.
These newlines are CR, LF, CRLF, next line, vertical tab, form feed, line separator, and paragraph separator.
- A predicate that accepts one CHARACTER and returns non-NIL if the CHARACTER should be split on, NIL otherwise.

:CR, :LF, :CRLF, and :ASCII assume that the Common Lisp implementation represents CHARACTERs internally as ASCII or one of its supersets
(e.g., extended ASCII), and :UNICODE assumes that it represents them internally as Unicode (which is also a superset of ASCII).
Additionally, all of the EOL-STYLEs just mentioned assume that #\Newline is either #\Return or #\Linefeed (which can be reasonably expected).

If HONOR-CRLF is supplied, it overrides EOL-STYLE’s interpretation of CRLF except if EOL-STYLE is NIL or :CRLF, in which case HONOR-CRLF has no effect.
(The :CRLF, :ASCII and :UNICODE EOL-STYLEs honor CRLF by default; the rest do not.)

If KEEP-EOLS is non-NIL, LINES does not strip the EOL characters from the lines.

Note that Common Lisp implementations may convert some or all of CR, LF, and CRLF to #\Newline when reading from file streams, which causes
LINES to split the contents of files differently across implementations. :CR, :LF, and :CRLF are suitable only when STRING’s lines certainly end with the corresponding EOL character, but if STRING originates from a file stream, LINES splits nothing unless the corresponding EOL character is the same as #\Newline, in which case LINES behaves as if EOL-STYLE were NIL (and indeed NIL is preferable to :CR, :LF, and :CRLF, though not to :ASCII and :UNICODE).

:UNICODE and :ASCII are the preferred EOL-STYLEs, the former to be maximally portable and correct, and the latter when Unicode is inapt. With either EOL-STYLE, LINES splits the entire contents of files correctly only when the Common Lisp implementation converts only CR, only LF, or all of CR, LF, and CRLF, to #\Newline (and when it
converts only CR or only LF, #\Newline must the same as the EOL character in question).
Again with either EOL-STYLE, LINES splits the lines of files, read with READ-LINE, correctly only when the implementation converts only LF or all of CR, LF, and CRLF to #\Newline (which must be #\Linefeed).
(Note the lack of the only-CR case when reading files line by line.) However, any incorrect behavior with :ASCII and :UNICODE is limited to LINES returning too many or too few empty lines.
The former – which is uncorrectable – can occur when CR and LF are converted, but not CRLF, and the latter – which can be corrected by supplying HONOR-CRLF as NIL – when CR and CRLF are converted (to #\Return), but not LF, or when LF and CRLF are converted (to #\Linefeed), but not CR.

For example, to split lines on LF and CRLF (eschewing the recommended :ASCII and :UNICODE) when the Common Lisp implementation converts only LF to #\Newline (which must be #\Linefeed), which is the same
behavior as Rust’s std::io::BufRead.lines (https://doc.rust-lang.org/std/io/trait.BufRead.html#method.lines) and Go’s bufio.ScanLines (https://golang.org/pkg/bufio/#ScanLines):

#.(ecase #\Newline (#\Linefeed))
(let ((string (coerce ’(#\a #\Return
#\b #\Linefeed
#\c #\Return #\Linefeed #\d)
’string)))
(serapeum:lines string :eol-style :lf :honor-crlf t))
=> ("a^Mb" "c" "d")
;; where ^M is #\Return.

(EOL-STYLE cannot be NIL here because otherwise HONOR-CRLF would have
no effect.)

To split lines in the same way as Python’s str.splitlines (https://docs.python.org/3/library/stdtypes.html#str.splitlines) when the Common Lisp implementation converts only CR, only LF, or all of CR, LF, and CRLF, to #\Newline (as previously described), but also keeping the EOL characters in order to know what they were:

#.(ecase #\Newline ((#\Return #\Linefeed)))
;; Omit file separator from the example because its textual
;; representation (^\) can confuse documentation browsers.
(let ((string (coerce ’(#\a #.(code-char #x001D)
#\b #.(code-char #x001E) #\c)
’string)))
(serapeum:lines
string
:eol-style (lambda (c)
(serapeum:in
c #\Return #\Linefeed
#.(code-char #x000B) ; #\Vt (vertical tab)
#\Page ; Form feed
#.(code-char #x001C) ; #\Fs (file separator) #.(code-char #x001D) ; #\Gs (group separator) #.(code-char #x001E) ; #\Rs (record separator) #.(code-char #x0085) ; Next line
#.(code-char #x2028) ; #\Line_Separator #.(code-char #x2029))) ; #\Paragraph_Separator :honor-crlf t
:keep-eols t))
=> ("a^]" "b^^" "c")
;; where ^] is group separator and ^^ is record separator.

To omit empty lines (thus uniformizing LINES’s behavior across Common Lisp implementations):

#.(ecase #\Newline ((#\Return #\Linefeed)))
(let ((string (coerce ’(#\a #\b #\c
#\Return #\Return #\Linefeed #\Linefeed #\z)
’string)))
(delete-if #’uiop:emptyp (serapeum:lines string :eol-style :unicode))) => ("abc" "z")

To additionally omit lines consisting only of whitespace:

#.(ecase #\Newline ((#\Return #\Linefeed)))
(let ((string (coerce ’(#\a #\b #\c
#\Return #\Return #\Linefeed #\Linefeed #\Space #\Linefeed
#\Tab #\Linefeed #\z)
’string)))
(delete-if #’uiop:emptyp
(mapcar #’serapeum:trim-whitespace
(serapeum:lines string :eol-style :unicode)))) => ("abc" "z")

Package

serapeum.

Source

strings.lisp.

Function: longer (x y)

Return the longer of X and Y.

If X and Y are of equal length, return X.

If X and Y are lists, this will only traverse the shorter of X and Y.

Package

serapeum.

Source

sequences.lisp.

Function: longest (seqs)

Return the longest seq in SEQS.

If there are lists in SEQS, then the total number of conses traversed will never exceed n*m, where n is the number of lists in SEQS and m is the length of the next-to-longest list (unless the longest list is not unique!).

Package

serapeum.

Source

sequences.lisp.

Function: make (class &rest initargs &key &allow-other-keys)

Shorthand for ‘make-instance’.
Unlike ‘make-instance’, this is not a generic function, so it can do more compile-time argument checking.

Also unlike ‘make-instance’, ‘make’ is defined to always return a single value. It also declares its return type (as ‘standard-object’, or also ‘structure-object’ if the implementation allows ‘make-instance’ on structures). This may allow the compiler to warn you if you (e.g.) try to treat the return value as a list or number.

After Eulisp.

Package

serapeum.

Source

clos.lisp.

Function: make-handler-any (fn &key name place value)
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-handler-number->number (fn &key name place value)
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-handler-string->string (fn &key name place value)
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-handler-void (fn &key name place value)
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-hash-table-function (&rest args &key &allow-other-keys)

Call ‘hash-table-function’ on a fresh hash table. ARGS can be args to ‘hash-table-function’ or args to ‘make-hash-table’, as they are disjoint.

Package

serapeum.

Source

hash-tables.lisp.

Function: make-heap (&key size element-type key test)
Package

serapeum.

Source

heap.lisp.

Function: make-hook-any (&key handlers combination)

Make hook and return it.
HANDLERS can also contain named functions.
Those will automatically be encapsulated with MAKE-HANDLER-ANY.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-hook-number->number (&key handlers combination)

Make hook and return it.
HANDLERS can also contain named functions.
Those will automatically be encapsulated with MAKE-HANDLER-NUMBER->NUMBER.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-hook-string->string (&key handlers combination)

Make hook and return it.
HANDLERS can also contain named functions.
Those will automatically be encapsulated with MAKE-HANDLER-STRING->STRING.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-hook-void (&key handlers combination)

Make hook and return it.
HANDLERS can also contain named functions.
Those will automatically be encapsulated with MAKE-HANDLER-VOID.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-octet-vector (size)

Make an octet vector of SIZE elements.

Package

serapeum.

Source

octets.lisp.

Function: map-tree (fun tree &key tag traversal)

Walk FUN over TREE and build a tree from the results.

The new tree may share structure with the old tree.

(eq tree (map-tree #’identity tree)) => T

FUN can skip the current subtree with (throw TAG SUBTREE), in which case SUBTREE will be used as the value of the subtree.

TRAVERSE can be one of ‘:preorder’, ‘:postorder’, or ‘:inorder’. The default is ‘:preorder’.

Package

serapeum.

Source

trees.lisp.

Function: mapcar-into (fn list)

Like (map-into list fn list).

From PAIP.

Package

serapeum.

Source

lists.lisp.

Function: mapconcat (fun seq separator &key stream)

Build a string by mapping FUN over SEQ.
Separate each value with SEPARATOR.

Equivalent to
(reduce #’concat (intersperse SEP SEQ) :key FUN)
but more efficient.

STREAM can be used to specify a stream to write to. It is resolved like the first argument to ‘format’.

From Emacs Lisp.

Package

serapeum.

Source

strings.lisp.

Function: maphash-into (hash-table fn &rest seqs)

Map FN over SEQS, updating HASH-TABLE with the results. Return HASH-TABLE.

FN is required to return two values, and key and a value.

Package

serapeum.

Source

hash-tables.lisp.

Function: maphash-new (fn hash-table &rest hash-table-args &key &allow-other-keys)

Like MAPHASH, but builds and returns a new hash table.

FN is a function of two arguments, like the function argument to ‘maphash’. It is required, however, to return two values, a new key and a new value.

If ‘copy-hash-table’ did not exist, you could define it as:

(maphash-new #’values hash-table)

Note it is not necessarily the case that the new hash table will have the same number of entries as the old hash table, since FN might evaluate to the same key more than once.

By default, the new hash table has the same hash table
properties (test, size) as HASH-TABLE, but these can be overridden with HASH-TABLE-ARGS.

Package

serapeum.

Source

hash-tables.lisp.

Function: maphash-return (fn hash-table)

Like MAPHASH, but collect and return the values from FN. From Zetalisp.

Package

serapeum.

Source

hash-tables.lisp.

Function: mapply (fn list &rest lists)

‘mapply’ is a cousin of ‘mapcar’.

If you think of ‘mapcar’ as using ‘funcall’:

(mapcar #’- ’(1 2 3))
≅ (loop for item in ’(1 2 3)
collect (funcall #’- item))

Then ‘mapply’ does the same thing, but with ‘apply’ instead.

(loop for item in ’((1 2 3) (4 5 6))
collect (apply #’+ item))
=> (6 15)

(mapply #’+ ’((1 2 3) (4 5 6)))
=> (6 15)

In variadic use, ‘mapply’ acts as if ‘append’ had first been used:

(mapply #’+ xs ys)
≡ (mapply #’+ (mapcar #’append xs ys))

But the actual implementation is more efficient.

‘mapply’ can convert a list of two-element lists into an alist:

(mapply #’cons ’((x 1) (y 2))
=> ’((x . 1) (y . 2))

Package

serapeum.

Source

lists.lisp.

Function: maybe-invoke-restart (restart &rest values)

When RESTART is active, invoke it with VALUES.

Package

serapeum.

Source

conditions.lisp.

Function: memq (item list)

Like (member ITEM LIST :test #’eq). Should only be used for symbols.

Package

serapeum.

Source

lists.lisp.

Function: merge-tables (&rest tables)

Merge TABLES, working from left to right.
The resulting hash table has the same parameters as the first table.

If no tables are given, an new, empty hash table is returned.

If a single table is given, a copy of it is returned.

If the same key is present in two tables, the value from the rightmost table is used.

All of the tables being merged must have the same value for ‘hash-table-test’.

Clojure’s ‘merge’.

Package

serapeum.

Source

hash-tables.lisp.

Function: mvconstantly (&rest values)

Like ‘constantly’, but returns all of VALUES as multiple values. If there are not VALUES, returns nothing.

Package

serapeum.

Source

functions.lisp.

Function: mvfold (fn seq &rest seeds)

Like ‘reduce’ extended to multiple values.

Calling ‘mvfold’ with one seed is equivalent to ‘reduce’:

(mvfold fn xs seed) ≡ (reduce fn xs :initial-value seed)

However, you can also call ‘mvfold’ with multiple seeds:

(mvfold fn xs seed1 seed2 seed3 ...)

How is this useful? Consider extracting the minimum of a sequence:

(reduce #’min xs)

Or the maximum:

(reduce #’max xs)

But both?

(reduce (lambda (cons item)
(cons (min (car cons) item)
(max (cdr cons) item)))
xs
:initial-value (cons (elt xs 0) (elt xs 0)))

You can do this naturally with ‘mvfold’.

(mvfold (lambda (min max item)
(values (min item min)
(max item max)))
xs (elt xs 0) (elt xs 0))

In general ‘mvfold’ provides a functional idiom for “loops with book-keeping” where we might otherwise have to use recursion or explicit iteration.

Has a compiler macro that generates efficient code when the number of SEEDS is fixed at compile time (as it usually is).

Package

serapeum.

Source

sequences.lisp.

Function: mvfoldr (fn seq &rest seeds)

Like ‘(reduce FN SEQ :from-end t)’ extended to multiple values. Cf. ‘mvfold’.

Package

serapeum.

Source

sequences.lisp.

Function: nconc1 (list item)

Like ‘append1’, but destructive.

Package

serapeum.

Source

lists.lisp.

Function: no (x)

Another alias for ‘not’ and ‘null’.

From Arc.

Package

serapeum.

Source

control-flow.lisp.

Function: nsplice-seq (sequence &key new start end)

Removes a part of SEQUENCE between START and END and replaces it with contents of NEW (if provided). SEQUENCE and NEW may be destroyed in the process and the result is allowed to share structure with the original if SEQUENCE is a list.

(nsplice-seq (list 1 2 3 4 5) :new (list :a :b :c) :start 1 :end 1)
=> (1 :A :B :C 2 3 4 5)

(nsplice-seq (list 1 2 3 4 5) :new (list :a :b :c) :start 1 :end 4)
=> (1 :A :B :C 5)

Omitting NEW removes elements from SEQUENCE:

(nsplice-seq (list 1 2 3 4 5) :start 1 :end 3)
=> ’(1 4 5)

Package

serapeum.

Source

sequences.lisp.

Function: nstring-invert-case (string)

Destructive version of ‘string-invert-case’.

Package

serapeum.

Source

strings.lisp.

Function: nstring-upcase-initials (string)

Destructive version of ‘string-upcase-initials’.

Package

serapeum.

Source

strings.lisp.

Function: nsubseq (seq start &optional end)

Return a subsequence that may share structure with SEQ.

Note that ‘nsubseq’ gets its aposematic leading ‘n’ not because it is itself destructive, but because, unlike ‘subseq’, destructive operations on the subsequence returned may mutate the original.

‘nsubseq’ also works with ‘setf’, with the same behavior as ‘replace’.

Package

serapeum.

Source

sequences.lisp.

Function: (setf nsubseq) (seq start &optional end)

Destructively set SEQ between START and END to VALUE. Uses ‘replace’ internally.

Package

serapeum.

Source

sequences.lisp.

Function: nth-arg (n)

Return a function that returns only its NTH argument, ignoring all others.

If you’ve ever caught yourself trying to do something like

(mapcar #’second xs ys)

then ‘nth-arg’ is what you need.

If ‘hash-table-keys’ were not already defined by Alexandria, you could define it as:

(defun hash-table-keys (table)
(maphash-return (nth-arg 0) table))

Package

serapeum.

Source

functions.lisp.

Function: nth-best (n seq pred &key key)

Return the Nth-best element of SEQ under PRED.

Equivalent to

(elt (sort (copy-seq seq) pred) n)

Or even

(elt (bestn (1+ n) seq pred) n)

But uses a selection algorithm for better performance than either.

Package

serapeum.

Source

sequences.lisp.

Function: nth-best! (n seq pred &key key)

Destructive version of ‘nth-best’.
Note that this function requires that SEQ be a vector.

Package

serapeum.

Source

sequences.lisp.

Function: nthrest (n list)

Alias for ‘nthcdr’.

Package

serapeum.

Source

lists.lisp.

Function: nub (seq &rest args &key start end key test)

Remove duplicates from SEQ, starting from the end.
That means, for each duplicate, the first occurrence will be the kept, and subsequent occurrences will be discarded.

TEST defaults to ‘equal’.

From Haskell.

Package

serapeum.

Source

sequences.lisp.

Function: null-if (arg1 arg2 &key test)

Return nil if arguments are equal under TEST, ARG1 otherwise. Return a second value of nil if the arguments were equal, T otherwise.

From SQL.

Package

serapeum.

Source

control-flow.lisp.

Function: null-if-empty (xs)

Return nil if XS is empty, XS otherwise.
If XS was empty the second value is nil; otherwise t.

This function also accepts multidimensional arrays. Arrays are considered empty if their total size (from ‘array-total-size‘) is zero.

Hash tables are considered empty if their count is 0.

Package

serapeum.

Source

sequences.lisp.

Function: null-if-zero (x)

If X is a nonzero number, return it, otherwise return nil. The second value is T if X was nonzero.

Package

serapeum.

Source

numbers.lisp.

Function: occurs (node tree &key key test traversal)

Is NODE present in TREE?

Package

serapeum.

Source

trees.lisp.

Function: occurs-if (test tree &key key traversal)

Is there a node (leaf or cons) in TREE that satisfies TEST?

Package

serapeum.

Source

trees.lisp.

Function: octet-vector (&rest args)

Constructor an octet vector from ARGS.

Package

serapeum.

Source

octets.lisp.

Function: octet-vector-p (x)

Is X an octet vector?

Package

serapeum.

Source

octets.lisp.

Function: octet-vector= (v1 v2 &key start1 end1 start2 end2)

Like ‘string=’ for octet vectors.

Package

serapeum.

Source

octets.lisp.

Function: octets (n &key big-endian)

Return N, an integer, as an octet vector. Defaults to little-endian order.

Package

serapeum.

Source

octets.lisp.

Function: of-length (length)

Return a predicate that returns T when called on a sequence of length LENGTH.

(funcall (of-length 3) ’(1 2 3)) => t
(funcall (of-length 1) ’(1 2 3)) => nil

Package

serapeum.

Source

sequences.lisp.

Function: once (fn)

Return a function that runs FN only once, caching the results forever.

Package

serapeum.

Source

functions.lisp.

Function: only-elt (seq)

Return the only element of SEQ.
If SEQ is empty, or contains more than one element, signal an error.

Package

serapeum.

Source

sequences.lisp.

Function: ordering (seq &key unordered-to-end from-end test key)

Given a sequence, return a function that, when called with ‘sort’, restores the original order of the sequence.

That is, for any SEQ (without duplicates), it is always true that

(equal seq (sort (reshuffle seq) (ordering seq)))

FROM-END controls what to do in case of duplicates. If FROM-END is true, the last occurrence of each item is preserved; otherwise, only the first occurrence counts.

TEST controls identity; it should be a valid test for a hash table. If the items cannot be compared that way, you can use KEY to transform them.

UNORDERED-TO-END controls where to sort items that are not present in the original ordering. By default they are sorted first but, if UNORDERED-TO-END is true, they are sorted last. In either case, they are left in no particular order.

Package

serapeum.

Source

sequences.lisp.

Function: package-exports (&optional package)

Return a list of the symbols exported by PACKAGE.

Package

serapeum.

Source

packages.lisp.

Function: package-name-keyword (package)

Return the name of PACKAGE as a keyword.

Package

serapeum.

Source

packages.lisp.

Function: package-names (package)

Return a list of all the names of PACKAGE: its name and its nicknames.

Package

serapeum.

Source

packages.lisp.

Function: pad-end (vec length &optional pad)

Pad VEC, a vector, to LENGTH, using PAD.
Like ‘pad-start’, but padding is addded to the end, rather than the beginning.

Package

serapeum.

Source

vectors.lisp.

Function: pad-start (vec length &optional pad)

Pad VEC, a vector, to LENGTH, using PAD.
If VEC is already the same length, or longer, than LENGTH, return VEC unchanged.

(pad-start "abc" 3)
=> "abc"

If PAD is a sequence, then it is repeated before VEC to make up LENGTH.

(pad-start "abc" 9 "def")
=> "defdefabc"

If PAD is not a sequence, it is used to fill the remainder of VEC.

(pad-start "abc" 6 #x)
=> "xxxabc"

PAD defaults to the space character.

This function is most useful for strings, but it can be used with any vector. Note that the vector returned has the same element type as VEC, so PAD must satisfy that element type.

Loosely inspired by ECMA.

Package

serapeum.

Source

vectors.lisp.

Function: pairhash (keys data &optional hash-table)

Like ‘pairlis’, but for a hash table.

Unlike ‘pairlis’, KEYS and DATA are only required to be sequences (of the same length), not lists.

By default, the hash table returned uses ‘eql’ as its tests. If you want a different test, make the table yourself and pass it as the HASH-TABLE argument.

Package

serapeum.

Source

hash-tables.lisp.

Function: parse-float (string &key start end junk-allowed type)

Parse STRING as a float of TYPE.

The type of the float is determined by, in order:
- TYPE, if it is supplied;
- The type specified in the exponent of the string;
- or ‘*read-default-float-format*’.

(parse-float "1.0") => 1.0s0
(parse-float "1.0d0") => 1.0d0
(parse-float "1.0s0" :type ’double-float) => 1.0d0

Of course you could just use ‘parse-number’, but sometimes only a float will do.

Package

serapeum.

Source

numbers.lisp.

Function: parse-leading-keywords (body)

Given BODY, return two values: a list of the leading inline keyword arguments, and the rest of the body.

Inline keywords are like the keyword arguments to individual cases in ‘restart-case’.

Package

serapeum.

Source

macro-tools.lisp.

Function: partial (fn &rest args)

Partial application.

Unlike ‘alexandria:curry’, which is only inlined when you ask it to be, ‘partial’ is always inlined if possible.

From Clojure.

Package

serapeum.

Source

functions.lisp.

Function: partition (pred seq &key start end key)

Partition elements of SEQ into those for which PRED returns true and false.

Return two values, one with each sequence.

Exactly equivalent to:
(values (remove-if-not predicate seq) (remove-if predicate seq)) except it visits each element only once.

Note that ‘partition‘ is not just ‘assort‘ with an up-or-down predicate. ‘assort‘ returns its groupings in the order they occur in the sequence; ‘partition‘ always returns the “true” elements first.

(assort ’(1 2 3) :key #’evenp) => ((1 3) (2))
(partition #’evenp ’(1 2 3)) => (2), (1 3)

Package

serapeum.

Source

sequences.lisp.

Function: partition-declarations (xs declarations &optional env)

Split DECLARATIONS into those that do and do not apply to XS. Return two values, one with each set.

Both sets of declarations are returned in a form that can be spliced directly into Lisp code:

(locally ,@(partition-declarations vars decls) ...)

Package

serapeum.

Source

macro-tools.lisp.

Function: partitions (preds seq &key start end key)

Generalized version of PARTITION.

PREDS is a list of predicates. For each predicate, ‘partitions’ returns a filtered copy of SEQ. As a second value, it returns an extra sequence of the items that do not match any predicate.

Items are assigned to the first predicate they match.

Package

serapeum.

Source

sequences.lisp.

Function: path-basename (pathname)

Return the basename, that is:
- if it’s a directory, the name of the directory,
- if it’s a file, the name of the file including its type (extension).

Package

serapeum.

Source

files.lisp.

Function: path-join (&rest pathnames)

Build a pathname by merging from right to left.
With ‘path-join’ you can pass the elements of the pathname being built in the order they appear in it:

(path-join (user-homedir-pathname) config-dir config-file)
≡ (uiop:merge-pathnames* config-file
(uiop:merge-pathnames* config-dir (user-homedir-pathname)))

Note that ‘path-join’ does not coerce the parts of the pathname into directories; you have to do that yourself.

(path-join "dir1" "dir2" "file") -> #p"file"
(path-join "dir1/" "dir2/" "file") -> #p"dir1/dir2/file"

Cf. ‘base-path-join’ for a similar function with more intuitive behavior.

Package

serapeum.

Source

files.lisp.

Function: plist-keys (plist)

Return the keys of a plist.

Package

serapeum.

Source

lists.lisp.

Function: plist-values (plist)

Return the values of a plist.

Package

serapeum.

Source

lists.lisp.

Function: pophash (key hash-table)

Lookup KEY in HASH-TABLE, return its value, and remove it.

This is only a shorthand. It is not in itself thread-safe.

From Zetalisp.

Package

serapeum.

Source

hash-tables.lisp.

Function: powerset (set)

Return the powerset of SET. Uses a non-recursive algorithm.

Package

serapeum.

Source

lists.lisp.

Function: prepend (&rest lists)

Construct and return a list by concatenating LISTS in reverse order.

(prepend list-1 list-2)
≡ (append list-2 list-1)

Package

serapeum.

Source

lists.lisp.

Function: pretty-print-hash-table (ht &optional stream)

Pretty print the hash-table HT to STREAM.

“‘
(pretty-print-hash-table (dict :a 1 :b 2 :c 3))
;; =>
(dict
:A 1
:B 2
:C 3
)
“‘

If you want to always pretty print hash tables, you can set this in your init file:

“‘ lisp
(toggle-pretty-print-hash-table)
“‘

Ported from RUTILS.

Package

serapeum.

Source

hash-tables.lisp.

Function: prod (array)

Return the product of all of the elements of ARRAY, a generalized array. Operates pairwise for numerical stability.

Package

serapeum.

Source

generalized-arrays.lisp.

Function: proper-subtype-p (subtype type &optional env)

Is SUBTYPE a proper subtype of TYPE?

This is, is it true that SUBTYPE is a subtype of TYPE, but not the same type?

Package

serapeum.

Source

types.lisp.

Function: proper-supertype-p (supertype type &optional env)

Is SUPERTYPE a proper supertype of TYPE?

That is, is it true that every value of TYPE is also of type SUPERTYPE, but not every value of SUPERTYPE is of type TYPE?

Package

serapeum.

Source

types.lisp.

Function: prune (leaf tree &key key test)

Remove LEAF from TREE wherever it occurs. See ‘prune-if’ for more information.

Package

serapeum.

Source

trees.lisp.

Function: prune-if (test tree &key key)

Remove any atoms satisfying TEST from TREE.

Pruning is defined "modulo flatten": you should get the same result from pruning, and then flattening, that you would get from flattening, and then filtering.

Also note that pruning is not defined for trees containing improper lists.

Package

serapeum.

Source

trees.lisp.

Function: qappend (queue list)

Append the elements of LIST onto the end of QUEUE. Return the queue.

Package

serapeum.

Source

queue.lisp.

Function: qback (queue)

Get the last element of a queue.

Package

serapeum.

Source

queue.lisp.

Function: (setf qback) (queue)
Package

serapeum.

Source

queue.lisp.

Function: qconc (queue list)

Destructively concatenate LIST onto the end of QUEUE. Return the queue.

Package

serapeum.

Source

queue.lisp.

Function: qlen (queue)

The number of items in QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: qlist (queue)

A list of the items in QUEUE. Does not cons.

Package

serapeum.

Source

queue.lisp.

Function: qpreconc (list queue)

Destructively splice LIST at the beginning of QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: qprepend (list queue)

Insert ITEMS at the beginning of QUEUE.

Package

serapeum.

Source

queue.lisp.

Function: queue (&rest initial-contents)

Build a new queue with INITIAL-CONTENTS.

Package

serapeum.

Source

queue.lisp.

Function: queue-empty-p (queue)

Is QUEUE empty?

Package

serapeum.

Source

queue.lisp.

Function: queuep (object)

Test for a queue.

Package

serapeum.

Source

queue.lisp.

Function: random-in-range (low high)

Random number in the range [low,high).

LOW and HIGH are automatically swapped if HIGH is less than LOW.

Note that the value of LOW+HIGH may be greater than the range that can
be represented as a number in CL. E.g., you can generate a random double float with

(random-in-range most-negative-double-float most-positive-double-float)

even though (+ most-negative-double-float most-positive-double-float)
would cause a floating-point overflow.

From Zetalisp.

Package

serapeum.

Source

numbers.lisp.

Function: range (start &optional stop step)

Return a (possibly specialized) vector of real numbers, starting from START.

With three arguments, return the integers in the interval [start,end) whose difference from START is divisible by STEP.

START, STOP, and STEP can be any real number, except that if STOP is greater than START, STEP must be positive, and if START is greater
than STOP, STEP must be negative.

The vector returned has the smallest element type that can represent numbers in the given range. E.g. the range [0,256) will usually be represented by a vector of octets, while the range [-10.0,10.0) will
be represented by a vector of single floats. The exact representation, however, depends on your Lisp implementation.

STEP defaults to 1.

With two arguments, return all the steps in the interval [start,end).

With one argument, return all the steps in the interval [0,end).

Package

serapeum.

Source

range.lisp.

Function: rassocar (item alist &rest args &key &allow-other-keys)

Like (car (rassoc ...))

Package

serapeum.

Source

lists.lisp.

Function: rassocdr (item alist &rest args &key &allow-other-keys)

Like (cdr (rassoc ...))

Package

serapeum.

Source

lists.lisp.

Function: ravel (array &key displace)

Return the items of ARRAY as a sequence.

Array theory calls this operation ‘list’, but the MOA operation is identical and has a more distinctive name.

Package

serapeum.

Source

generalized-arrays.lisp.

Function: read-eval-prefix (object stream)

A helper for making objects readable.

The obvious way to give an object a readable representation is to use the sharp-dot reader macro. However, methods are supposed to consult the values of ‘*print-readably*’ and ‘*read-eval*’ before doing so. This function takes care of that for you.

If ‘*print-readably*’ is false, return an empty string.

If ‘*print-readably*’ is true, and ‘*read-eval*’ is also true, return the string "#.".

If ‘*print-readably*’ is true, but ‘*read-eval*’ is not true, signal an error.

Package

serapeum.

Source

defining-types.lisp.

Function: recklessly-continue (&optional condition)

Invokes the last bound RECKLESSLY-CONTINUE restart. Returns NIL if no such restart was bound or if the restart failed to transfer control.

Package

serapeum.

Source

static-let.lisp.

Function: repeat-sequence (seq n)

Return a sequence like SEQ, with the same content, but repeated N times.

(repeat-sequence "13" 3)
=> "131313"

The length of the sequence returned will always be the length of SEQ times N.

This means that 0 repetitions results in an empty sequence:

(repeat-sequence "13" 0)
=> ""

Conversely, N may be greater than the possible length of a sequence, as long as SEQ is empty.

(repeat-sequence "" (1+ array-dimension-limit))
=> ""

Package

serapeum.

Source

sequences.lisp.

Function: reshape (shape array &key element-type displace)

Return an array that has the same items as ARRAY, a generalized array, but whose shape is SHAPE.

If the resulting array is smaller than ARRAY, then discard the excess items.

If the resulting array is larger than ARRAY, fill it with the items of ARRAY cyclically.

ELEMENT-TYPE specifies an element type to use for the resulting array if one cannot be inferred from the array itself.

Package

serapeum.

Source

generalized-arrays.lisp.

Function: reshuffle (seq &key element-type)

Like ‘alexandria:shuffle’, but non-destructive.

Regardless of the type of SEQ, the return value is always a vector.

If ELEMENT-TYPE is provided, this is the element type (modulo upgrading) of the vector returned.

If ELEMENT-TYPE is not provided, then the element type of the vector returned is T, if SEQ is not a vector. If SEQ is a vector, then the element type of the vector returned is the same as the as the element type of SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: resolve-executable (p)

Look for an executable using the PATH environment variable.
P is a pathname designator.

On Windows only, if P does not have an extension, it assumed to end in ‘.exe‘.

Note that this function does not check the current directory (even on Windows) and it does not care if P is already an absolute pathname: it only cares about its name and type.

Package

serapeum.

Source

files.lisp.

Function: reuse-cons (x y x-y)

If X and Y are the car and cdr of X-Y, return X-Y.

Otherwise, return a fresh cons of X and Y.

Package

serapeum.

Source

trees.lisp.

Function: round-to (number &optional divisor)

Like ‘round’, but return the resulting number.

(round 15 10) => 2
(round-to 15 10) => 20

Package

serapeum.

Source

numbers.lisp.

Function: run-hooks (&rest hooks)

Run all the hooks in HOOKS, without arguments.
The variable ‘*hook*’ is bound to the name of each hook as it is being run.

Package

serapeum.

Source

hooks.lisp.

Function: runs (seq &key start end key test compare-last count)

Return a list of runs of similar elements in SEQ.
The arguments START, END, and KEY are as for ‘reduce’.

(runs ’(head tail head head tail))
=> ’((head) (tail) (head head) (tail))

By defualt, the function TEST is called with the first element of the run as its first argument.

(runs #(10 1 5 10 1) :test #’>)
=> (#(10 1 5) #(10))

COMPARE-LAST changes this behavior to test against the previous element of the run:

(runs #(10 1 5 10 1) :test #’> :compare-last t)
(#(10 1) #(5) #(10))

The COUNT argument limits how many runs are returned.

(runs ’(head tail tail head head tail) :count 2)
=> ’((head) (tail tail))

Package

serapeum.

Source

sequences.lisp.

Function: same (key-fn seq &key test start end)

Return true if KEY-FN returns the same value for any/all members of LIST.

Package

serapeum.

Source

sequences.lisp.

Function: same-case-p (string)

Every character with case in STRING has the same case. Return ‘:upper’ or ‘:lower’ as appropriate.

Package

serapeum.

Source

strings.lisp.

Function: scan (fn seq &rest args &key from-end start end initial-value &allow-other-keys)

Return the partial reductions of SEQ.

Each element of the result sequence is the result of calling ‘reduce’ on the elements of the sequence up to that point (inclusively).

(reduce #’+ ’(1)) => 1
(reduce #’+ ’(1 2)) => 3
(reduce #’+ ’(1 2 3)) => 6
(reduce #’+ ’(1 2 3 4)) => 10
(scan #’+ ’(1 2 3 4)) => ’(1 3 6 10)

The result of calling ‘scan‘ on an empty sequence is always an empty sequence, however.

(reduce #’+ ’()) => 0
(scan #’+ ’()) => ’()

This is sometimes called a "prefix sum", "cumulative sum", or "inclusive scan".

From APL.

Package

serapeum.

Source

sequences.lisp.

Function: seq= (&rest xs)

Like ‘equal’, but recursively compare sequences element-by-element.

Two elements X and Y are ‘seq=’ if they are ‘equal’, or if they are both sequences of the same length and their elements are all ‘seq=’.

Package

serapeum.

Source

sequences.lisp.

Function: sequencep (x)

Is X a sequence?

Package

serapeum.

Source

sequences.lisp.

Function: set-hash-table (set &rest hash-table-args &key test key strict &allow-other-keys)

Return SET, a list considered as a set, as a hash table.
This is the equivalent of Alexandria’s ‘alist-hash-table’ and ‘plist-hash-table’ for a list that denotes a set.

STRICT determines whether to check that the list actually is a set.

The resulting hash table has the elements of SET for both its keys and values. That is, each element of SET is stored as if by
(setf (gethash (key element) table) element)

Package

serapeum.

Source

hash-tables.lisp.

Function: shape (array)

Return the shape of ARRAY, a generalized array.
For a true array this is equivalent to ‘array-dimensions’.

Package

serapeum.

Source

generalized-arrays.lisp.

Function: shorter (x y)

Return the shorter of X and Y.

Package

serapeum.

Source

sequences.lisp.

Function: shortest (seqs)

Return the shortest seq in SEQS.

If there are lists in SEQS, then the total number of conses traversed will never exceed n*m, where n is the number of lists in SEQS and m is the length of the shortest list.

Package

serapeum.

Source

sequences.lisp.

Function: shrink (n by)

Decrease N by a factor.

Package

serapeum.

Source

numbers.lisp.

Function: si-prefix (n &key base)

Given a number, return the prefix of the nearest SI unit.

Three values are returned: the long form, the short form, and the multiplying factor.

(si-prefix 1001) => "kilo", "k", 1000d0

BASE can be 1000, 10, 1024, or 2. 1000 is the default, and prefixes start at kilo and milli. Base 10 is mostly the same, except the prefixes centi, deci, deca and hecto are also used. Base 1024 uses the same prefixes as 1000, but with 1024 as the base, as in vulgar file sizes. Base 2 uses the IEC binary prefixes.

Package

serapeum.

Source

units.lisp.

Function: single (seq)

Is SEQ a sequence of one element?

Package

serapeum.

Source

sequences.lisp.

Function: slice (seq start &optional end)

Like ‘subseq’, but allows negative bounds to specify offsets.
Both START and END accept negative bounds.

(slice "string" -3 -1) => "in"

A call to ‘slice’ where the first argument is positive and the second argument is negative is equivalent to chaining two calls to ‘drop’:

(drop 3 (drop -1 "string")) = "in"
(slice "string" 3 -1) = "in"

If the bounds cross in the middle, the result is an empty string:

(slice "x" 1 -1) => ""

Note that ‘slice’ implicitly clamps bounds, even when they are not negative:

(slice "x" 0 100) => "x"

Setf of ‘slice’ is like setf of ‘ldb’: afterwards, the place being set
holds a new sequence which is not EQ to the old.

Package

serapeum.

Source

sequences.lisp.

Setf expander for this function

(setf slice).

Function: slot-value-safe (instance slot-name &optional default)

Like ‘slot-value’, but doesn’t signal errors.
Returns three values:
1. The slot’s value (or nil),
2. A boolean that is T if the slot exists and *was* bound,
3. A boolean that is T if the slot exists.

Note that this function does call ‘slot-value’ (if the slot exists), so if there is a method on ‘slot-unbound’ for the class it will be invoked. In this case the second value will still be ‘nil’, however.

Package

serapeum.

Source

clos.lisp.

Setf expander for this function

(setf slot-value-safe).

Function: sort-new (seq pred &key key element-type)

Return a sorted vector of the elements of SEQ.

You can think of this as a non-destructive version of ‘sort’, except that it always returns a vector. (If you’re going to copy a sequence for the express purpose of sorting it, you might as well copy it into a form that can be sorted efficiently.)

ELEMENT-TYPE is interpreted as for ‘reshuffle’.

Package

serapeum.

Source

sequences.lisp.

Function: splice-seq (sequence &key new start end)

Removes a part of SEQUENCE between START and END and replaces it with contents of NEW (if provided). Does not modify SEQUENCE or NEW, but the result is allowed to share structure with the original if SEQUENCE is a list.

(splice-seq ’(1 2 3 4 5) :new ’(:a :b :c) :start 1 :end 1)
=> (1 :A :B :C 2 3 4 5)

(splice-seq ’(1 2 3 4 5) :new ’(:a :b :c) :start 1 :end 4)
=> (1 :A :B :C 5)

Omitting NEW removes elements from SEQUENCE:

(splice-seq ’(1 2 3 4 5) :start 1 :end 3)
=> ’(1 4 5)

Package

serapeum.

Source

sequences.lisp.

Function: stable-set-difference (list1 list2 &key key test test-not)

Like ‘set-difference’, but preserve the order of LIST1’s elements.

Package

serapeum.

Source

lists.lisp.

Function: stable-sort-new (seq pred &key key element-type)

Like ‘sort-new’, but sort as if by ‘stable-sort’ instead of ‘sort’.

Package

serapeum.

Source

sequences.lisp.

Function: static-binding-active-error (group &optional all-groups-p)
Package

serapeum.

Source

static-let.lisp.

Function: static-binding-flush-error (&optional group)
Package

serapeum.

Source

static-let.lisp.

Function: string$= (suffix string &key start1 end1 start2 end2)

Is SUFFIX a suffix of STRING?

Package

serapeum.

Source

strings.lisp.

Function: string*= (substring string &key start1 end1 start2 end2)

Is SUBSTRING a substring of STRING?

This is similar, but not identical, to SEARCH.

(search nil "foo") => 0
(search "nil" "nil") => 0
(string*= nil "foo") => NIL
(string*= nil "nil") => T

Package

serapeum.

Source

strings.lisp.

Function: string+ (&rest args)

Optimized function for building small strings.

Roughly equivalent to

(let ((*print-pretty* nil))
(format nil "~@{~a}" args...))

But may be more efficient when the arguments of certain simple types (such as strings, characters, symbols, pathnames, and fixnums).

Note that unlike ‘princ’, ‘string+’ treats ‘nil’ as the same as the empty string:

(string+ nil)
=> ""

(string+ "x" nil)
=> "x"

This utility is inspired by the utility of the same name in Allegro.

Package

serapeum.

Source

strings.lisp.

Function: string-contains-p (substring string &key start1 end1 start2 end2)

Like ‘string*=’, but case-insensitive.

Package

serapeum.

Source

strings.lisp.

Function: string-count (substring string &key start end)

Count how many times SUBSTRING appears in STRING.

Package

serapeum.

Source

strings.lisp.

Function: string-gensym (x)

Equivalent to (gensym (string x)).

Generally preferable to calling GENSYM with a string, because it respects the current read table.

The alternative to writing ‘(mapcar (compose #’gensym #’string) ...)’ in every other macro.

Package

serapeum.

Source

macro-tools.lisp.

Function: string-invert-case (string)

Invert the case of STRING.
This does the same thing as a case-inverting readtable: - If the string is uppercase, downcase the string. - If the string is lowercase, upcase the string.
- If the string is mixed-case, leave it alone.

Package

serapeum.

Source

strings.lisp.

Function: string-join (strings separator &key stream end)

Join strings in STRINGS, separated by SEPARATOR.

SEPARATOR can be any string designator.

If STREAM is provided, write to STREAM rather than returning a string.

If END is provided, then insert SEPARATOR after the last string, as well as between strings.

Equivalent to ‘(mapconcat #’string STRINGS SEPARATOR)’.

Package

serapeum.

Source

strings.lisp.

Function: string-prefix-p (prefix string &key start1 end1 start2 end2)

Like ‘string^=’, but case-insensitive.

Package

serapeum.

Source

strings.lisp.

Function: string-replace (old string new &key start end stream)

Like ‘string-replace-all’, but only replace the first match.

Package

serapeum.

Source

strings.lisp.

Function: string-replace-all (old string new &key start end stream count)

Do search-and-replace for constant strings.

Note that START and END only affect where the replacements are made: the part of the string before START, and the part after END, are always included verbatim.

(string-replace-all "old" "The old old way" "new"
:start 3 :end 6)
=> "The new old way"

COUNT can be used to limit the maximum number of occurrences to replace. If COUNT is not specified, every occurrence of OLD between START and END is replaced with NEW.

(string-replace-all "foo" "foo foo foo" "quux")
=> "quux quux quux"

(string-replace-all "foo" "foo foo foo" "quux" :count 2)
=> "quux quux foo"

STREAM can be used to specify a stream to write to. It is resolved like the first argument to ‘format’.

Package

serapeum.

Source

strings.lisp.

Function: string-suffix-p (suffix string &key start1 end1 start2 end2)

Like ‘string$=’, but case-insensitive.

Package

serapeum.

Source

strings.lisp.

Function: string-token-p (token string &key start1 end1 start2 end2)

Like ‘string~=’, but case-insensitive.

Package

serapeum.

Source

strings.lisp.

Function: string-upcase-initials (string)

Return STRING with the first letter of each word capitalized. This differs from STRING-CAPITALIZE in that the other characters in each word are not changed.

(string-capitalize "an ACRONYM") -> "An Acronym") (string-upcase-initials "an ACRONYM") -> "An ACRONYM")

From Emacs Lisp (where it is simply ‘upcase-initials’).

Package

serapeum.

Source

strings.lisp.

Function: string^= (prefix string &key start1 end1 start2 end2)

Is PREFIX a prefix of STRING?

Package

serapeum.

Source

strings.lisp.

Function: string~= (token string &key start1 end1 start2 end2)

Does TOKEN occur in STRING as a token?

Equivalent to
(find TOKEN (tokens STRING) :test #’string=), but without consing.

Package

serapeum.

Source

strings.lisp.

Function: sum (array)

Return the sum of all of the elements of ARRAY, a generalized array. Operates pairwise for numerical stability.

Package

serapeum.sum.

Source

generalized-arrays.lisp.

Function: supertypep (supertype type &optional env)

Is SUPERTYPE a supertype of TYPE? That is, is TYPE a subtype of SUPERTYPE?

Package

serapeum.

Source

types.lisp.

Function: swaphash (key value hash-table)

Set KEY and VALUE in HASH-TABLE, returning the old values of KEY.

This is only a shorthand. It is not in itself thread-safe.

From Zetalisp.

Package

serapeum.

Source

hash-tables.lisp.

Function: take (n seq)

Return, at most, the first N elements of SEQ, as a *new* sequence of the same type as SEQ.

If N is longer than SEQ, SEQ is simply copied.

If N is negative, then |N| elements are taken (in their original order) from the end of SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: take-until (pred seq)

Like ‘take-while’ with the complement of PRED.

Package

serapeum.

Source

sequences.lisp.

Function: take-while (pred seq)

Return the prefix of SEQ for which PRED returns true.

Package

serapeum.

Source

sequences.lisp.

Function: tally (array)

Return the total size of ARRAY, a generalized array. For a true array this is equivalent to ‘array-total-size’.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: tell (shape)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: throttle (fn wait &key synchronized memoized)

Wrap FN so it can be called no more than every WAIT seconds.
If FN was called less than WAIT seconds ago, return the values from the last call. Otherwise, call FN normally and update the cached values.

WAIT, of course, may be a fractional number of seconds.

The throttled function is not thread-safe by default; use SYNCHRONIZED to get a version with a lock.

You can pass MEMOIZED if you want the function to remember values between calls.

Package

serapeum.

Source

functions.lisp.

Function: time-since (time)

Return seconds since TIME.

Package

serapeum.

Source

time.lisp.

Function: time-until (time)

Return seconds until TIME.

Package

serapeum.

Source

time.lisp.

Function: toggle-pretty-print-hash-table (&optional on)

Toggles printing hash-tables with PRETTY-PRINT-HASH-TABLE or with the default method. If ON is set explicitly, turn on literal printing (T), otherwise use the default (NIL).

Ported from RUTILS.

Package

serapeum.

Source

hash-tables.lisp.

Function: tokens (string &key start end)

Separate STRING into tokens.
Tokens are runs of non-whitespace characters.

(tokens "\"I’m here,\" Tom said presently.") => ("\"I’m" "here,\"" "Tom" "said" "presently.")

Cf. ‘words’.

Package

serapeum.

Source

strings.lisp.

Function: toposort (constraints &key test tie-breaker from-end unordered-to-end)

Turn CONSTRAINTS into a predicate for use with SORT.

Each constraint should be two-element list, where the first element of the list should come before the second element of the list.

(def dem-bones ’((toe foot)
(foot heel)
(heel ankle)
(ankle shin)
(shin knee)
(knee back)
(back shoulder)
(shoulder neck)
(neck head)))
(sort (reshuffle (mapcar #’car dem-bones))
(toposort dem-bones))
=> (TOE FOOT HEEL ANKLE SHIN KNEE BACK SHOULDER NECK)

If the graph is inconsistent, signals an error of type ‘inconsistent-graph‘:

(toposort ’((chicken egg) (egg chicken)))
=> Inconsistent graph: ((CHICKEN EGG) (EGG CHICKEN))

TEST, FROM-END, and UNORDERED-TO-END are passed through to ‘ordering’.

Package

serapeum.

Source

sequences.lisp.

Function: trampoline (fn &rest args)

Use the trampoline technique to simulate mutually recursive functions.

Call FN with supplied ARGS, if any.

If FN returns a functions, call that function with no arguments. Repeat until the return value is not a function, and finally return that non-function value.

Note that, to return a function as a final value, you must wrap it in some data structure and unpack it.

Most likely to be useful for Lisp implementations that do not provide tail call elimination.

From Clojure.

Package

serapeum.

Source

functions.lisp.

Function: trim-whitespace (string)

STRING without whitespace at ends.

Package

serapeum.

Source

strings.lisp.

Function: true (x)

Coerce X to a boolean.
That is, if X is null, return ‘nil’; otherwise return ‘t’.

Based on an idea by Eric Naggum.

Package

serapeum.

Source

types.lisp.

Function: unary->variadic (fn)

Return a function that takes any number of arguments and calls FN on them as a list.

Wraps a function that expects a single argument, a list, so it can be used variadically.

Package

serapeum.

Source

functions.lisp.

Function: unbits (bits &key big-endian)

Turn a sequence of BITS into an integer. Defaults to little-endian.

Package

serapeum.

Source

numbers.lisp.

Reader: unbox (instance)

The value in the box X.

Package

serapeum.

Source

box.lisp.

Target Slot

unbox.

Writer: (setf unbox) (instance)

Put VALUE in box X.

Package

serapeum.

Source

box.lisp.

Target Slot

unbox.

Function: undeq (item queue)

Add an item to the front of QUEUE.
For an empty queue, this does the same thing as ENQ.

For a queue with elements, this adds a new element onto the front of queue (like pushing to an ordinary list).

This is called ‘undeq’ because it can be used to undo a ‘deq’.

Package

serapeum.

Source

queue.lisp.

Function: undisplace-array (array)

Recursively get the fundamental array that ARRAY is displaced to.

Return the fundamental array, and the start and end positions into it.

Borrowed from Erik Naggum.

Package

serapeum.

Source

arrays.lisp.

Function: unique-name (x)

Alias for ‘string-gensym’.

Package

serapeum.

Source

macro-tools.lisp.

Function: universal-to-unix (time)

Convert a universal time to a Unix time.

Package

serapeum.

Source

time.lisp.

Function: unix-to-universal (time)

Convert a Unix time to a universal time.

Package

serapeum.

Source

time.lisp.

Function: unoctets (bytes &key big-endian)

Concatenate BYTES, an octet vector, into an integer. Defaults to little-endian order.

Package

serapeum.

Source

octets.lisp.

Function: unparse-ordinary-lambda-list (&optional required optional rest keywords aok? aux key?)

Put together an ordinary lambda list from its constituent parts.

This is the inverse of ‘alexandria:parse-ordinary-lambda-list’.

lambda-list
≡ (multiple-value-call #’unparse-ordinary-lambda-list (parse-ordinary-lambda-list lambda-list)

Package

serapeum.

Source

macro-tools.lisp.

Function: unsplice (form)

If FORM is non-nil, wrap it in a list.

This is useful with ,@ in macros, and with ‘mapcan’.

E.g., instead of writing:

‘(.... ,@(when flag ’((code))))

You can write:

‘(.... ,@(unsplice (when flag ’(code))))

It may be especially helpful when splicing in variables. Instead of writing:

‘(.... ,@(and docstring ‘(,docstring)))

You can simply write:

‘(.... ,@(unsplice docstring))

From Lparallel.

Package

serapeum.

Source

macro-tools.lisp.

Function: valence (array)

Return the number of dimensions of ARRAY, a generalized array. For a true array this is equivalent to ‘array-rank’.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: values-vector (vec)

Return the elements of VEC, a vector, as multiple values. This is to vectors what ‘values-list’ is to lists.

Package

serapeum.

Source

vectors.lisp.

Function: variadic->unary (fn)

Return a function that takes a single argument, a list, and applies FN to it.

Practically equivalent to ‘(curry #’apply FN arguments...)’.

Package

serapeum.

Source

functions.lisp.

Function: vect (&rest initial-contents)

Succinct constructor for adjustable vectors with fill pointers.

(vect 1 2 3)
≡ (make-array 3
:adjustable t
:fill-pointer 3
:initial-contents (list 1 2 3))

The fill pointer is placed after the last element in INITIAL-CONTENTS.

As a constructor this also has a matching definition as a Trivia pattern for destructing.

Package

serapeum.

Source

vectors.lisp.

Function: vector-conc-extend (vector new-elements &optional extension)

Add NEW-ELEMENTS to the end of VECTOR, an adjustable array with a fill-pointer. This is the practical equivalent to calling ‘vector-push-extend’ on
each element on NEW-ELEMENTS, but should be faster.

Returns VECTOR.

Package

serapeum.

Source

vectors.lisp.

Function: vector= (vec1 vec2 &key test start1 start2 end1 end2)

Like ‘string=’ for any vector.
If no TEST is supplied, elements are tested with ‘eql’.

Package

serapeum.

Source

vector=.lisp.

Function: walk-tree (fun tree &key tag traversal)

Call FUN in turn over each atom and cons of TREE.

FUN can skip the current subtree with (throw TAG nil).

Package

serapeum.

Source

trees.lisp.

Function: whitespacep (char)

Is CHAR whitespace?

Spaces, tabs, any kind of line break, page breaks, and no-break spaces are considered whitespace.

Package

serapeum.

Source

strings.lisp.

Function: word-wrap (string &key column stream)

Return a word-wrapped version of STRING that breaks at COLUMN.

Note that this is not a general-purpose word-wrapping routine like you would find in a text editor: in particular, any existing whitespace is removed.

Package

serapeum.

Source

strings.lisp.

Function: words (string &key start end)

Split STRING into words.

The definition of a word is the same as that used by ‘string-capitalize’: a run of alphanumeric characters.

(words "Four score and seven years")
=> ("Four" "score" "and" "seven" "years")

(words "2 words")
=> ("2" "words")

(words "two_words")
=> ("two" "words")

(words "\"I’m here,\" Tom said presently.")
=> ("I" "m" "here" "Tom" "said" "presently")

Cf. ‘tokens’.

Package

serapeum.

Source

strings.lisp.

Function: write-file-into-stream (pathname output &key if-does-not-exist external-format)

Write the contents of FILE into STREAM.

Package

serapeum.

Source

files.lisp.

Function: write-stream-into-file (stream pathname &key if-exists if-does-not-exist)

Read STREAM and write the contents into PATHNAME.

STREAM will be closed afterwards, so wrap it with ‘make-concatenated-stream’ if you want it left open.

Package

serapeum.

Source

files.lisp.


6.1.8 Generic functions

Generic Function: add-hook (hook fn &key append)

Add FN to the value of HOOK.

Package

serapeum.

Source

hooks.lisp.

Methods
Method: add-hook ((hook hook-any) (handler handler-any) &key append)

Add HANDLER to HOOK. Return HOOK. HOOK must be of type HOOK-ANY HANDLER must be of type HANDLER-ANY.

Source

hooks.lisp.

Method: add-hook ((hook hook-number->number) (handler handler-number->number) &key append)

Add HANDLER to HOOK. Return HOOK.
HOOK must be of type HOOK-NUMBER->NUMBER HANDLER must be of type HANDLER-NUMBER->NUMBER.

Source

hooks.lisp.

Method: add-hook ((hook hook-string->string) (handler handler-string->string) &key append)

Add HANDLER to HOOK. Return HOOK.
HOOK must be of type HOOK-STRING->STRING HANDLER must be of type HANDLER-STRING->STRING.

Source

hooks.lisp.

Method: add-hook ((hook hook-void) (handler handler-void) &key append)

Add HANDLER to HOOK. Return HOOK. HOOK must be of type HOOK-VOID HANDLER must be of type HANDLER-VOID.

Source

hooks.lisp.

Method: add-hook ((hook symbol) fn &key append)
Generic Reader: combination (object)
Generic Writer: (setf combination) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: combination ((hook hook))
Writer Method: (setf combination) ((hook hook))

This can be used to reverse the execution order, return a single value, etc.

Source

hooks.lisp.

Target Slot

combination.

Generic Function: combine-composed-hook (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: combine-composed-hook ((hook hook) &rest args)

Return the result of the composition of the HOOK handlers on ARGS, from oldest to youngest.
Without handler, return ARGS as values.
This is an acceptable ‘combination’ for ‘hook’.

Source

hooks.lisp.

Generic Function: combine-hook-until-failure (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: combine-hook-until-failure ((hook hook) &rest args)

Return the list of values until the first nil result.
Handlers after the failing one are not run.

You need to check if the hook has handlers to know if a NIL return value is due to the first handler failing or an empty hook.

This is an acceptable ‘combination’ for ‘hook’.

Source

hooks.lisp.

Generic Function: combine-hook-until-success (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: combine-hook-until-success ((hook hook) &rest args)

Return the value of the first non-nil result.
Handlers after the successful one are not run.

You need to check if the hook has handlers to know if a NIL return value is due to all handlers failing or an empty hook.

This is an acceptable ‘combination’ for ‘hook’.

Source

hooks.lisp.

Generic Function: default-combine-hook (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: default-combine-hook ((hook hook) &rest args)

Return the list of the results of the HOOK handlers applied from youngest to oldest to ARGS.
Return ’() when there is no handler.
This is an acceptable ‘combination’ for ‘hook’.

Source

hooks.lisp.

Generic Reader: description (object)
Generic Writer: (setf description) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: description ((handler handler))
Writer Method: (setf description) ((handler handler))

Description of the handler. This is purely informative.

Source

hooks.lisp.

Target Slot

description.

Generic Function: disable-hook (hook &rest handlers)
Package

serapeum/contrib/hooks.

Methods
Method: disable-hook ((hook hook) &rest handlers)

Prepend HANDLERS to the list of disabled handlers. Without HANDLERS, disable all of them.

Source

hooks.lisp.

Generic Reader: disabled-handlers (object)
Generic Writer: (setf disabled-handlers) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: disabled-handlers ((hook hook))
Writer Method: (setf disabled-handlers) ((hook hook))

Those handlers are not run by ‘run-hook’.
This is useful it the user wishes to disable some or all handlers without removing them from the hook.

Source

hooks.lisp.

Target Slot

disabled-handlers.

Generic Function: enable-hook (hook &rest handlers)
Package

serapeum/contrib/hooks.

Methods
Method: enable-hook ((hook hook) &rest handlers)

Prepend HANDLERS to the list of HOOK’s handlers. Without HANDLERS, enable all of them.

Source

hooks.lisp.

Generic Reader: fn (object)
Generic Writer: (setf fn) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: fn ((handler handler))
Writer Method: (setf fn) ((handler handler))

The handler function. It can be an anonymous function.

Source

hooks.lisp.

Target Slot

fn.

Generic Reader: handler-type (object)
Generic Writer: (setf handler-type) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: handler-type ((handler handler))
Writer Method: (setf handler-type) ((handler handler))

The function type of FN. This is purely informative.

Source

hooks.lisp.

Target Slot

handler-type.

Generic Reader: handlers (object)
Generic Writer: (setf handlers) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: handlers ((hook hook))
Writer Method: (setf handlers) ((hook hook))
Source

hooks.lisp.

Target Slot

handlers.

Generic Reader: inconsistent-graph-constraints (condition)

The constraints of an ‘inconsistent-graph’ error. Cf. ‘toposort’.

Package

serapeum.

Methods
Reader Method: inconsistent-graph-constraints ((condition inconsistent-graph))
Source

sequences.lisp.

Target Slot

constraints.

Generic Function: monitor (object)

Return a unique lock associated with OBJECT.

Package

serapeum.

Source

threads.lisp.

Methods
Reader Method: monitor ((synchronized synchronized))

automatically generated reader method

Target Slot

monitor.

Method: monitor (object)
Method: monitor ((object mutex))
Generic Reader: name (object)
Generic Writer: (setf name) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: name ((handler handler))
Writer Method: (setf name) ((handler handler))

Name of the handler.
If defaults to the function name if ‘fn’ is a named function.
This is useful so that the user can build handlers out of anonymous functions.

Source

hooks.lisp.

Target Slot

name.

Generic Reader: place (object)
Generic Writer: (setf place) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: place ((handler handler))
Writer Method: (setf place) ((handler handler))

If the handler is meant to be a setter, PLACE describes what is set. PLACE can be a symbol or a pair (CLASS SLOT).
This can be left empty if the handler is not a setter.

Source

hooks.lisp.

Target Slot

place.

Generic Function: remove-hook (hook fn)

Remove FN from the symbol value of HOOK.

Package

serapeum.

Source

hooks.lisp.

Methods
Method: remove-hook ((hook hook) handler-or-name)

Remove handler matching HANDLER-OR-NAME from the handlers or the disabled-handlers in HOOK.
HANDLER-OR-NAME is either a handler object or a symbol. Return HOOK’s handlers.

Source

hooks.lisp.

Method: remove-hook ((hook symbol) fn)
Generic Function: run-hook (hook &rest args)

Apply each function in HOOK to ARGS.

Package

serapeum.

Source

hooks.lisp.

Methods
Method: run-hook ((hook hook) &rest args)
Source

hooks.lisp.

Method: run-hook ((*hook* symbol) &rest args)
Generic Function: run-hook-until-failure (hook &rest args)

Like ‘run-hook-with-args’, but quit once a function returns nil.

Package

serapeum.

Source

hooks.lisp.

Methods
Method: run-hook-until-failure ((*hook* symbol) &rest args)
Generic Function: run-hook-until-success (hook &rest args)

Like ‘run-hook-with-args’, but quit once a function returns non-nil.

Package

serapeum.

Source

hooks.lisp.

Methods
Method: run-hook-until-success ((*hook* symbol) &rest args)
Generic Function: run-hook-with-args-until-failure (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: run-hook-with-args-until-failure ((hook hook) &rest args)

This is equivalent to setting the combination function to ‘combine-hook-until-failure’ and calling ‘run-hook’.

Source

hooks.lisp.

Generic Function: run-hook-with-args-until-success (hook &rest args)
Package

serapeum/contrib/hooks.

Methods
Method: run-hook-with-args-until-success ((hook hook) &rest args)

This is equivalent to setting the combination function to ‘combine-hook-until-success’ and calling ‘run-hook’.

Source

hooks.lisp.

Generic Reader: static-binding-flush-error-all-groups-p (condition)
Package

serapeum.

Methods
Reader Method: static-binding-flush-error-all-groups-p ((condition static-binding-flush-error))
Source

static-let.lisp.

Target Slot

all-groups-p.

Generic Reader: static-binding-flush-error-group (condition)
Package

serapeum.

Methods
Reader Method: static-binding-flush-error-group ((condition static-binding-flush-error))
Source

static-let.lisp.

Target Slot

group.

Generic Reader: value (object)
Generic Writer: (setf value) (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: value ((handler handler))
Writer Method: (setf value) ((handler handler))

If the handler is meant to be a setter, VALUE can be used to describe what FN is going to set to PLACE.
In particular, PLACE and VALUE can be used to compare handlers.
This can be left empty if the handler is not a setter.

Source

hooks.lisp.

Target Slot

value.


6.1.9 Standalone methods

Method: initialize-instance :around ((class topmost-object-class) &rest initargs &key direct-superclasses topmost-class)
Source

mop.lisp.

Method: make-load-form ((self bounds) &optional env)
Source

vector=.lisp.

Method: make-load-form ((queue queue) &optional env)
Source

queue.lisp.

Method: make-load-form ((self box) &optional env)
Source

box.lisp.

Method: make-load-form ((self %read-only-struct) &optional env)
Source

defining-types.lisp.

Method: make-load-form ((self unbound) &optional env)
Source

definitions.lisp.

Method: make-load-form ((self agroup) &optional env)
Source

sequences.lisp.

Method: make-load-form ((self subenv) &optional env)
Source

internal-definitions.lisp.

Method: print-object ((object bounds) stream)
Source

vector=.lisp.

Method: print-object ((queue queue) stream)
Source

queue.lisp.

Method: print-object ((self box) stream)
Source

box.lisp.

Method: print-object ((self topmost-object-class) stream)
Source

mop.lisp.

Method: print-object ((object agroup) stream)
Source

sequences.lisp.

Method: print-object ((object subenv) stream)
Source

internal-definitions.lisp.

Method: reinitialize-instance :around ((class topmost-object-class) &rest initargs &key direct-superclasses)
Source

mop.lisp.

Method: validate-superclass ((class1 topmost-object-class) (class2 standard-class))
Package

sb-mop.

Source

mop.lisp.


6.1.10 Method combinations

Method Combination: standard/context ()
Package

serapeum.

Source

mop.lisp.


6.1.11 Conditions

Condition: case-failure

A subtype of type-error specifically for case failures.

Package

serapeum.

Source

macro-tools.lisp.

Direct superclasses

type-error.

Condition: dispatch-case-error
Package

serapeum.

Source

dispatch-case.lisp.

Direct superclasses

type-error.

Direct methods

dispatch-case-error-matched-types.

Direct Default Initargs
InitargValue
:matched-typesnil
Direct slots
Slot: matched-types-slot
Package

serapeum/dispatch-case.

Initargs

:matched-types

Readers

dispatch-case-error-matched-types.

Writers

This slot is read-only.

Condition: econd-failure

An ECOND failed.

Package

serapeum.

Source

control-flow.lisp.

Direct superclasses

error.

Direct Default Initargs
InitargValue
:test-count0
Direct slots
Slot: test-count
Initargs

:test-count

Condition: inconsistent-graph

A graph that cannot be consistently sorted.

Package

serapeum.

Source

sequences.lisp.

Direct superclasses

error.

Direct methods

inconsistent-graph-constraints.

Direct slots
Slot: constraints

The offending constraints

Initargs

:constraints

Readers

inconsistent-graph-constraints.

Writers

This slot is read-only.

Condition: letrec-restriction-violation

Violation of the letrec restriction.

The "letrec restriction" means that the expressions being bound in a ‘letrec’ cannot refer to the value of other bindings in the same ‘letrec’.

For ‘fbindrec’, the restriction applies everywhere. For ‘fbindrec*’, it only applies to functions not yet bound.

Package

serapeum.

Source

fbind.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: args
Initargs

:args

Readers

args-of.

Writers

(setf args-of).

Condition: recursion-forbidden
Package

serapeum.

Source

control-flow.lisp.

Direct superclasses

error.

Direct slots
Slot: form
Initargs

:form

Condition: static-binding-active-error

A subtype of error related to attempts to flush static bindings which are currently active.

Package

serapeum.

Source

static-let.lisp.

Direct superclasses
Direct Default Initargs
InitargValue
:group(required-argument group)
Condition: static-binding-flush-error

A subtype of error related to attempts to flush static bindings in a potentially unsafe way.

Package

serapeum.

Source

static-let.lisp.

Direct superclasses

error.

Direct subclasses

static-binding-active-error.

Direct methods
Direct Default Initargs
InitargValue
:all-groups-pnil
:groupnil
Direct slots
Slot: group
Package

serapeum/static-let.

Initargs

:group

Readers

static-binding-flush-error-group.

Writers

This slot is read-only.

Slot: all-groups-p
Package

serapeum/static-let.

Initargs

:all-groups-p

Readers

static-binding-flush-error-all-groups-p.

Writers

This slot is read-only.

Condition: static-load-time-value-error
Package

serapeum.

Source

portability.lisp.

Direct superclasses

error.

Direct slots
Slot: form
Initargs

:form

Slot: read-only-p
Initargs

:read-only-p


6.1.12 Structures

Structure: box

A box is just a mutable cell.

You create a box using ‘box’ and get and set its value using the accessor ‘unbox’.

(def a-box (box t))
(unbox a-box) => t
(setf (unbox a-box) nil)
(unbox a-box) => nil

Serapeum attempts to provide the guarantee that, on Lisps that support atomic operations (compare-and-swap), ‘unbox‘ on boxes should be updateable atomically. (See [atomics](https://github.com/Shinmera/atomics)).

At the moment, boxes are implemented as structures, but that may change. In particular, you should not depend on being able to recognize boxes using a type or predicate.

Package

serapeum.

Source

box.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: unbox
Readers

unbox.

Writers

(setf unbox).

Structure: queue

Basic cons queues, with an implementation based on PAIP and the original Norvig & Waters paper, and an API mostly borrowed from Arc.

About Arc. For the most part, Arc-style identifiers are pessimal, neither quite opaque nor quite explicit, like riddles. But by using abbreviated names, we avoid the danger of clashing with special-purpose queue implementations.

Create a queue with ‘queue’, like ‘list’:

(queue 1 2 3) => #<QUEUE (1 2 3)>

Get the items with ‘qlist’:

(qlist (queue 1 2 3)) => ’(1 2 3)

Add items with ‘enq’:

(enq 3 (queue 1 2)) => #<QUEUE (1 2 3)>

Remove an item with ‘deq’:

(deq (queue 1 2 3)) => 1

Prepend an item with ‘undeq’:

(qlist (undeq 1 (queue 2 3))) => ’(1 2 3)

To (destructively) join a list to the end of the queue, use ‘qconc’:

(qconc (queue 1 2 3) ’(4 5 6)) => #<QUEUE (1 2 3 4 5 6)>

The rest of the API:

- ‘queuep’ Test for a queue
- ‘qlen’ Like ‘(length (qlist ...))’
- ‘clear-queue’ Clear the queue
- ‘front’ Like ‘(car (qlist ...))’
- ‘qback’ Get the last element of the queue
- ‘queue-empty-p’ Test if the queue is empty
- ‘qappend’ Non-destructively join a list to the end of the queue - ‘qconc’ Destructively join a list to the end of the queue
- ‘qprepend’ Non-destructively join a list to the front of the queue

Note that support for both ‘deq’ and ‘undeq’ means that a queue is also effectively a stack. (But not quite a double-ended queue: you can push to either end, and pop from the front, but you can’t pop from the end.)

The idea is that *collecting* is something we do often enough to justifying making *collectors* (queues) first-class.

Package

serapeum.

Source

queue.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: cons
Package

common-lisp.

Type

cons

Initform

(error "no cons!")

Readers

queue-cons.

Writers

This slot is read-only.


6.1.13 Classes

Class: handler

Handlers are wrappers around functions used in typed hooks.
They serve two purposes as opposed to regular functions:

- They can embed a NAME so that anonymous functions can be conveniently used in lambda.
- If the handler is meant to be a setter, the PLACE and VALUE slot can be used to identify and compare setters.

With this extra information, it’s possible to compare handlers and, in particular, avoid duplicates in hooks.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name

Name of the handler.
If defaults to the function name if ‘fn’ is a named function.
This is useful so that the user can build handlers out of anonymous functions.

Type

symbol

Initargs

:name

Readers

name.

Writers

(setf name).

Slot: description

Description of the handler. This is purely informative.

Type

string

Initform

""

Initargs

:description

Readers

description.

Writers

(setf description).

Slot: fn

The handler function. It can be an anonymous function.

Type

function

Initform

(alexandria:required-argument (quote serapeum/contrib/hooks:fn))

Initargs

:fn

Readers

fn.

Writers

(setf fn).

Slot: handler-type

The function type of FN. This is purely informative.

Initargs

:handler-type

Readers

handler-type.

Writers

(setf handler-type).

Slot: place

If the handler is meant to be a setter, PLACE describes what is set. PLACE can be a symbol or a pair (CLASS SLOT).
This can be left empty if the handler is not a setter.

Type

(or symbol list)

Initargs

:place

Readers

place.

Writers

(setf place).

Slot: value

If the handler is meant to be a setter, VALUE can be used to describe what FN is going to set to PLACE.
In particular, PLACE and VALUE can be used to compare handlers.
This can be left empty if the handler is not a setter.

Initargs

:value

Readers

value.

Writers

(setf value).

Class: handler-any
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

handler.

Direct methods

add-hook.

Class: handler-number->number
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

handler.

Direct methods

add-hook.

Class: handler-string->string
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

handler.

Direct methods

add-hook.

Class: handler-void
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

handler.

Direct methods

add-hook.

Class: hook

This hook class serves as support for typed-hook.

Typing in hook is crucial to guarantee that a hook is well formed, i.e. that it’s handlers accept the right argument types and return the right value types.

Because typing is too limited in Common Lisp, we leverage CLOS to generate subclasses of ‘hook’ and ‘handlers’ with typed helper functions.
The ‘add-hook’ will thus only accept handlers of the right types.
This implementation is good enough to catch typing errors at compile time.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: handler-class

The class of the supported handlers.

Type

symbol

Initform

t

Readers

handler-class.

Writers

This slot is read-only.

Slot: handlers
Type

list

Initform

(quote nil)

Initargs

:handlers

Readers

handlers.

Writers

(setf handlers).

Slot: disabled-handlers

Those handlers are not run by ‘run-hook’.
This is useful it the user wishes to disable some or all handlers without removing them from the hook.

Type

list

Initform

(quote nil)

Initargs

:disabled-handlers

Readers

disabled-handlers.

Writers

(setf disabled-handlers).

Slot: combination

This can be used to reverse the execution order, return a single value, etc.

Type

function

Initform

(function serapeum/contrib/hooks:default-combine-hook)

Initargs

:combination

Readers

combination.

Writers

(setf combination).

Class: hook-any
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

hook.

Direct methods

add-hook.

Direct slots
Slot: handler-class
Initform

(quote serapeum/contrib/hooks:handler-any)

Class: hook-number->number
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

hook.

Direct methods

add-hook.

Direct slots
Slot: handler-class
Initform

(quote serapeum/contrib/hooks:handler-number->number)

Class: hook-string->string
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

hook.

Direct methods

add-hook.

Direct slots
Slot: handler-class
Initform

(quote serapeum/contrib/hooks:handler-string->string)

Class: hook-void
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Direct superclasses

hook.

Direct methods

add-hook.

Direct slots
Slot: handler-class
Initform

(quote serapeum/contrib/hooks:handler-void)

Class: synchronized

Mixin for a class with its own monitor.

Package

serapeum.

Source

threads.lisp.

Direct methods

monitor.

Direct slots
Slot: monitor
Initform

(bordeaux-threads:make-recursive-lock "object monitor")

Readers

monitor.

Writers

This slot is read-only.

Class: topmost-object-class
Package

serapeum.

Source

mop.lisp.

Direct superclasses

standard-class.

Direct methods
Direct slots
Slot: topmost-class
Package

serapeum/mop.

Type

symbol

Initargs

:topmost-class

Readers

topmost-class.

Writers

This slot is read-only.


6.1.14 Types

Type: -> (args &optional values)

The type of a function from ARGS to VALUES.

Package

serapeum.

Source

types.lisp.

Type: absolute-directory-pathname ()
Package

serapeum.

Source

files.lisp.

Type: absolute-pathname ()
Package

serapeum.

Source

files.lisp.

Type: assure (type-spec)
Package

serapeum.

Source

types.lisp.

Type: directory-pathname ()
Package

serapeum.

Source

files.lisp.

Type: file-pathname ()
Package

serapeum.

Source

files.lisp.

Type: input-stream ()
Package

serapeum.

Source

types.lisp.

Type: no-applicable-method-error ()

The type of the error signaled by ‘no-applicable-method’ on this Lisp. Note this may not be unique.

Package

serapeum.

Source

portability.lisp.

Type: non-wild-pathname ()

A pathname without wild components.

Package

serapeum.

Source

files.lisp.

Type: nor (&rest types)
Package

serapeum.

Source

types.lisp.

Type: octet ()
Package

serapeum.

Source

types.lisp.

Type: octet-vector (&optional length)

An array of octets.

Package

serapeum.

Source

types.lisp.

Type: output-stream ()
Package

serapeum.

Source

types.lisp.

Type: relative-pathname ()
Package

serapeum.

Source

files.lisp.

Type: single ()
Package

serapeum.

Source

sequences.lisp.

Type: soft-alist-of (key-type value-type)

A soft constraint for the elements of an alist.

Equivalent to ‘(soft-list-of (cons KEY-TYPE VALUE-TYPE))‘.

Package

serapeum.

Source

types.lisp.

Type: soft-list-of (type)

A soft constraint for the elements of a list.

The elements are restricted only as far as is practical, which is not very far, using heuristics which will not be specified here because they may improve over time. That said, since the goal of this type is to be practically useful, it will avoid any checks that would be O(n) in the length of the list.

Package

serapeum.

Source

types.lisp.

Type: subclass-union (class-name)

Return a disjunction of all the direct subtypes of CLASS.
This can be useful for exhaustiveness checking over the direct subtypes of a class.

This should not be used for classes meant to be subclassed by library users.

Package

serapeum.

Source

clos.lisp.

Type: true ()
Package

serapeum.

Source

types.lisp.

Type: tuple (&rest types)

A proper list where each element has the same type as the corresponding element in TYPES.

(typep ’(1 :x #c) ’(tuple integer keyword character)) => T

As a shortcut, a quoted form among TYPES is expanded to an ‘eql’ type specifier. (tuple ’function symbol)
≡ (tuple (eql function) symbol)

Literal keywords, numbers, and characters are also treated as ‘eql’ type specifiers. (tuple :name 1 #a symbol)
≡ (tuple (eql :name) (eql 1) (eql #a) symbol)

Package

serapeum.

Source

types.lisp.

Type: wholenum ()

A whole number. Equivalent to ‘(integer 0 *)’.

Package

serapeum.

Source

types.lisp.

Type: wild-pathname ()

A pathname with wild components.

Package

serapeum.

Source

files.lisp.


6.2 Internals


6.2.1 Constants

Constant: +atomic-accessors+
Package

serapeum.

Source

box.lisp.

Constant: +hash-table-default-size+
Package

serapeum.

Source

hash-tables.lisp.

Constant: +pathsep+

Path separator for this OS.

Package

serapeum.

Source

files.lisp.

Constant: +seconds-in-day+
Package

serapeum.

Source

time.lisp.

Constant: +seconds-in-hour+
Package

serapeum.

Source

time.lisp.

Constant: +storage-for-deflex-var-+alist-breakeven++
Package

serapeum.

Source

functions.lisp.

Constant: +storage-for-deflex-var-iec-prefixes+

The IEC binary prefixes, as powers of 2.

Package

serapeum.

Source

units.lisp.

Constant: +storage-for-deflex-var-no-bounds-checks+
Package

serapeum.

Source

range.lisp.

Constant: +storage-for-deflex-var-no-break-space+
Package

serapeum.

Source

strings.lisp.

Constant: +storage-for-deflex-var-octet-vector-class+
Package

serapeum/vector=.

Source

vector=.lisp.

Constant: +storage-for-deflex-var-seq-cutoff+

Max length above which to operate pairwise.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Constant: +storage-for-deflex-var-si-prefixes+

List as SI prefixes: power of ten, long form, short form.

Package

serapeum.

Source

units.lisp.

Constant: +storage-for-deflex-var-si-prefixes-base-1000+

The SI prefixes as powers of 1000, with centi, deci, deca and hecto omitted.

Package

serapeum.

Source

units.lisp.

Constant: +storage-for-deflex-var-standard-input-syntax-vars+

Reader control variables bound by ‘with-standard-io-syntax’.

Package

serapeum.

Source

reader.lisp.

Constant: +storage-for-deflex-var-whitespace+

Whitespace characters.

Package

serapeum.

Source

strings.lisp.

Constant: +unix-epoch+

The Unix epoch as a universal time.

Package

serapeum.

Source

time.lisp.


6.2.2 Special variables

Special Variable: %hook-table

Global hook table.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Special Variable: *active-groups*
Package

serapeum/static-let.

Source

static-let.lisp.

Special Variable: *case-macro-target*

Implementation-appropriate target syntax clause deduplication.
How should repeated clauses in a case macro be deduplicated? With flet or a tagbody?

Package

serapeum.

Source

macro-tools.lisp.

Special Variable: *flushable-bindings*
Package

serapeum/static-let.

Source

static-let.lisp.

Special Variable: *flushing-lock*
Package

serapeum/static-let.

Source

static-let.lisp.

Special Variable: *forbidden-heads*

Symbols that should not occur in the head of a list of forms. E.g. ‘progn’, ‘locally’.

Package

serapeum.

Source

macro-tools.lisp.

Special Variable: *internal-definitions-slots*
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Special Variable: *lexenv*

The environment of the macro being expanded.

Package

serapeum.

Source

fbind.lisp.

Special Variable: *monitors*
Package

serapeum.

Source

threads.lisp.

Special Variable: *recursions*
Package

serapeum.

Source

control-flow.lisp.

Special Variable: *soft-list-cutoff*
Package

serapeum.

Source

types.lisp.

Special Variable: *subenv*
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Special Variable: *units*
Package

serapeum.

Source

defining-types.lisp.

Special Variable: *vref-by-type*
Package

serapeum.

Source

types.lisp.


6.2.3 Symbol macros

Symbol Macro: %all-branches%
Package

serapeum.

Source

types.lisp.

Symbol Macro: %in-branching%
Package

serapeum.

Source

types.lisp.

Symbol Macro: +alist-breakeven+
Package

serapeum.

Source

functions.lisp.

Symbol Macro: iec-prefixes
Package

serapeum.

Source

units.lisp.

Symbol Macro: matched-types
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Symbol Macro: no-bounds-checks
Package

serapeum.

Source

range.lisp.

Symbol Macro: no-break-space
Package

serapeum.

Source

strings.lisp.

Symbol Macro: octet-vector-class
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: rest-arg
Package

serapeum/op.

Source

op.lisp.

Symbol Macro: seq-cutoff
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Symbol Macro: si-prefixes
Package

serapeum.

Source

units.lisp.

Symbol Macro: si-prefixes-base-1000
Package

serapeum.

Source

units.lisp.

Symbol Macro: sorting-networks
Package

serapeum.

Source

control-flow.lisp.

Symbol Macro: standard-input-syntax-values
Package

serapeum.

Source

reader.lisp.

Symbol Macro: standard-input-syntax-vars
Package

serapeum.

Source

reader.lisp.

Symbol Macro: test/=
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/char-equal
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/char=
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/eq
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/eql
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/equal
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: test/equalp
Package

serapeum/vector=.

Source

vector=.lisp.

Symbol Macro: underscore
Package

serapeum/op.

Source

op.lisp.


6.2.4 Macros

Macro: %do-each ((var seq &optional return) &body body)

Only for Lisps that do not support extensible sequences.

Package

serapeum.

Source

sequences.lisp.

Macro: %with-boolean ((&rest branches) &body body)
Package

serapeum.

Source

types.lisp.

Macro: assure-values (typespecs &body form)
Package

serapeum.

Source

types.lisp.

Macro: case-using-aux (pred keyform &body clauses)
Package

serapeum.

Source

control-flow.lisp.

Macro: char-case-1 (keyform &body clauses)
Package

serapeum.

Source

tree-case.lisp.

Macro: char-ecase-1 (keyform &body clauses)
Package

serapeum.

Source

tree-case.lisp.

Macro: check-range/inline (start stop step)
Package

serapeum.

Source

range.lisp.

Macro: collecting* (&body body)

Intern COLLECT in the current package and bind it as a collector with MACROLET.

Package

serapeum.

Source

iter.lisp.

Macro: declaim-constant-function (&rest fns)

Declare that FNs are constant functions, for the benefit of Lisps that understand such declarations.

Package

serapeum.

Source

types.lisp.

Macro: declaim-freeze-type (&rest types)

Declare that TYPES is not going to change.

On Lisps that understand it, this is roughly equivalent to "sealing" a type in an OOP language: a promise that the type will never have any new subtypes, so tests for the type can be open-coded.

Package

serapeum.

Source

types.lisp.

Macro: declaim-freeze-type-1 (type)
Package

serapeum.

Source

types.lisp.

Macro: declaim-maybe-inline (&rest fns)
Package

serapeum.

Source

macro-tools.lisp.

Macro: declaim-maybe-inline-1 (fn)
Package

serapeum.

Source

macro-tools.lisp.

Macro: define-env-method (name (self &rest args) &body body)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Macro: define-real-range (name &body &key)
Package

serapeum.

Source

range.lisp.

Macro: define-simple-exporter (macro-name lambda-list)
Package

serapeum.

Source

exporting.lisp.

Macro: define-variadic-equality (variadic binary)
Package

serapeum.

Source

control-flow.lisp.

Macro: dispatch-case/nobindings (vars-and-types &body clauses)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Macro: do-each/map ((var seq &optional return) &body body)

The simple, out-of-line version.

Package

serapeum.

Source

sequences.lisp.

Macro: do-strings ((s more?) &body body)
Package

serapeum.

Source

strings.lisp.

Macro: do-subseq ((var seq &optional return &key start end from-end) &body body)
Package

serapeum.

Source

sequences.lisp.

Macro: do-vector ((var vec &optional return) &body body)

Iterate over the items of a vector in a manner similar to ‘dolist’.

Package

serapeum.

Source

sequences.lisp.

Macro: ensuring-functions (vars &body body)
Package

serapeum.

Source

macro-tools.lisp.

Macro: etypecase-of/no-shadows (type expr &body clauses)

Like ‘etypecase-of’, but filter shadowed clauses.

Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Macro: firstn-values (n expr)
Package

serapeum.

Source

binding.lisp.

Macro: flet* (bindings &body body)
Package

serapeum.

Source

binding.lisp.

Macro: generate-values-vector-case (vec)
Package

serapeum.

Source

vectors.lisp.

Macro: if-let1 (var test &body then)
Package

serapeum.

Source

control-flow.lisp.

Macro: length-gt (cmp offset-fn seqs)
Package

serapeum.

Source

sequences.lisp.

Macro: let-initialized (bindings &body body)

Like LET, but if any of BINDINGS are uninitialized, try to give them sane initialization values.

Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Macro: let1 (var expr &body body)

Bind VAR, immutably, to EXPR and evaluate BODY.

This may be pronounced with equal propriety as "let-one" or "let-once".

Package

serapeum.

Source

binding.lisp.

Macro: letrec-with (setq (&rest bindings) &body body)
Package

serapeum.

Source

binding.lisp.

Macro: lret-aux (let (&rest bindings) &body body)
Package

serapeum.

Source

binding.lisp.

Macro: mvdef (vars &body &optional)
Package

serapeum.

Source

definitions.lisp.

Macro: nix-1 (place)
Package

serapeum.

Source

control-flow.lisp.

Macro: op/no-walker (&body body)
Package

serapeum/op.

Source

op.lisp.

Macro: policy-quality-in-env (qual)
Package

serapeum.

Source

types.lisp.

Macro: read-only-var (real-var &optional name)
Setf Expander: (setf read-only-var) (real-var &optional name)
Package

serapeum.

Source

macro-tools.lisp.

Macro: rebinding-functions (bindings &body body)

Like ‘rebinding’, but specifically for functions.
The value being rebound will be wrapped in ‘ensure-function’.

Package

serapeum.

Source

macro-tools.lisp.

Macro: seq-dispatch (seq &body list-form)

Efficiently dispatch on the type of SEQ.

Package

serapeum.

Source

macro-tools.lisp.

Macro: si-prefix-rec (n base prefixes)
Package

serapeum.

Source

units.lisp.

Macro: sort-values/network (pred &rest values)
Package

serapeum.

Source

control-flow.lisp.

Macro: sort-values/temp-vector (pred &rest values)
Package

serapeum.

Source

control-flow.lisp.

Macro: stack-flet (bindings &body body)
Package

serapeum.

Source

binding.lisp.

Macro: truly-the (type &body expr)
Package

serapeum.

Source

types.lisp.

Macro: variable-type-in-env (var)
Package

serapeum.

Source

types.lisp.

Macro: vector-dispatch (vec &body bit-vector-form)

Efficiently dispatch on the type of VEC.
The first form provides special handling for bit vectors. The second form provides generic handling for all types of vectors.

Package

serapeum.

Source

macro-tools.lisp.

Macro: with-bounds ((start1 end1 start2 end2) bounds &body body)
Package

serapeum/vector=.

Source

vector=.lisp.

Macro: with-canonicalized-binding-accessors (() &body body)
Package

serapeum/static-let.

Source

static-let.lisp.

Macro: with-int-vector ((var vect) &body body)
Package

serapeum.

Source

range.lisp.

Macro: with-list-bucket ((seq) &body body)

Wrap BODY with inlined bucket accessors for lists.

Package

serapeum.

Source

sequences.lisp.

Macro: with-matched-type (type &body body)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Macro: with-nullable ((var type) &body body)
Package

serapeum.

Source

types.lisp.

Macro: with-sequence-bucket ((seq) &body body)

Wrap BODY with inlined bucket accessors for generic sequences.

This might not seem worthwhile, and it’s not for ‘bucket-seq’, but for ‘bucket-push’ (and even ‘make-bucket’) it is, since accumulating for generic sequences just uses queues.

Package

serapeum.

Source

sequences.lisp.

Macro: with-simple-vector (((v vector) (s start) (e end)) &body body)

If VECTOR is a displaced or adjustable array, binds V to the underlying simple vector, adds an adequate offset to START and END and binds those offset values to S and E. Otherwise, if VECTOR is already a simple array, it’s simply bound to V with no further changes.

START and END are unchecked and assumed to be within bounds.

Note that in some Lisps, a slow copying implementation is necessary to obtain a simple vector thus V will be bound to a copy of VECTOR coerced to a simple-vector. Therefore, you shouldn’t attempt to modify V.

Package

serapeum.

Source

portability.lisp.

Macro: with-specialized-buckets ((seq) &body body)

Ensure BODY is run with the appropriate specialized, inlined versions of the bucket accessors.

This is only likely to be worthwhile around a loop; if you’re calling a bucket accessor once or twice the code bloat isn’t worth it.

Package

serapeum.

Source

sequences.lisp.

Macro: with-string-bucket ((seq) &body body)

Wrap BODY with inlined bucket accessors for strings.

Package

serapeum.

Source

sequences.lisp.

Macro: with-syms (syms &body body)

Like ‘with-gensyms’, but binds SYMS in the current package.

Package

serapeum.

Source

iter.lisp.

Macro: with-type-declarations-trusted ((&key) &body body)
Package

serapeum.

Source

types.lisp.

Macro: with-vector-bucket ((seq) &body body)

Wrap BODY with inlined bucket accessors for vectors (including strings).

Package

serapeum.

Source

sequences.lisp.

Macro: with-vref (type &body body)
Package

serapeum.

Source

types.lisp.

Macro: without-internal-definitions (&body body)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Macro: wrong-type (datum type restart &body report)
Package

serapeum.

Source

types.lisp.


6.2.5 Compiler macros

Compiler Macro: count-range (start &optional end by)
Package

serapeum.

Source

range.lisp.

Compiler Macro: require-type (datum spec)
Package

serapeum.

Source

types.lisp.

Compiler Macro: require-type-for (datum spec place)
Package

serapeum.

Source

types.lisp.

Compiler Macro: test-load-time-value (fn form read-only-p)
Package

serapeum.

Source

portability.lisp.


6.2.6 Ordinary functions

Function: $path ()

Split the PATH environment variable.

Package

serapeum.

Source

files.lisp.

Function: %flatten (array)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: %flush (group)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: %make-static-binding (&key name value initializedp read-only lock)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: (setf %read-only-var) (var)
Package

serapeum.

Source

macro-tools.lisp.

Function: %require-type (datum spec)
Package

serapeum.

Source

types.lisp.

Function: %require-type-for (datum spec place)
Package

serapeum.

Source

types.lisp.

Function: add-hook-internal (hook handler &key append)

Add HANDLER to HOOK if not already in it.
Return HOOK.
HANDLER is also not added if in the ‘disabled-handlers’. If APPEND is non-nil, HANDLER is added at the end.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: agroup (exemplar bucket)
Package

serapeum.

Source

sequences.lisp.

Reader: agroup-bucket (instance)
Package

serapeum.

Source

sequences.lisp.

Target Slot

bucket.

Reader: agroup-exemplar (instance)
Package

serapeum.

Source

sequences.lisp.

Target Slot

exemplar.

Function: analyze-fbinds (bindings lexenv)

Pull apart BINDINGS, looking for lambdas to lift.

Package

serapeum.

Source

fbind.lisp.

Function: augment/block (block &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: augment/funs (funs &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: augment/macros (macros &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: augment/symbol-macros (symbol-macros &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: augment/tags (tags &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: augment/vars (binds &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: body+vars (body env)
Package

serapeum/op.

Source

op.lisp.

Function: body-decls (body)
Package

serapeum.

Source

fbind.lisp.

Function: bounds (start1 end1 start2 end2)
Package

serapeum/vector=.

Source

vector=.lisp.

Reader: bounds-end1 (instance)
Package

serapeum/vector=.

Source

vector=.lisp.

Target Slot

end1.

Reader: bounds-end2 (instance)
Package

serapeum/vector=.

Source

vector=.lisp.

Target Slot

end2.

Reader: bounds-start1 (instance)
Package

serapeum/vector=.

Source

vector=.lisp.

Target Slot

start1.

Reader: bounds-start2 (instance)
Package

serapeum/vector=.

Source

vector=.lisp.

Target Slot

start2.

Function: bounds-trivial? (vec start end)
Package

serapeum/vector=.

Source

vector=.lisp.

Function: boxp (object)
Package

serapeum.

Source

box.lisp.

Function: branch-type (branch)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: bucket-append (seq items bucket)

Append ITEMS to the end of BUCKET according to SEQ.

The items will appear, together and in the same order, in the sequence taken from the bucket by BUCKET-SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: bucket-push (seq item bucket)

Insert ITEM at the end of BUCKET according to SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: bucket-seq (seq bucket)

Return a sequence "like" SEQ using the elements of BUCKET.

Note that it is not safe to call the function more than once on the same bucket.

Package

serapeum.

Source

sequences.lisp.

Function: build-bind/ftype (fn var decls env)

Return a form, suitable for the bindings of a ‘flet’ or ‘labels’ form, that binds a function named FN which calls the function in a variable named VAR.

If there is a declared ftype for FN in the decls-env combination, it may be used to make calling VAR more efficient by avoiding ‘apply’.

Package

serapeum.

Source

fbind.lisp.

Function: call-with-array-data/copy (vector start end fn)
Package

serapeum.

Source

portability.lisp.

Function: call-with-array-data/fast (vector start end fn)
Package

serapeum.

Source

portability.lisp.

Function: call/standard-input-syntax (fn)
Package

serapeum.

Source

reader.lisp.

Function: call/string (fn stream)

Resolve STREAM like ‘format’ and call FN with the result.

Package

serapeum.

Source

strings.lisp.

Function: canonicalize-binding (binding)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: canonicalize-bindings (bindings)
Package

serapeum.

Source

binding.lisp.

Function: canonicalize-key (k)
Package

serapeum.

Source

sequences.lisp.

Function: canonicalize-test (test &optional test-not)
Package

serapeum.

Source

sequences.lisp.

Function: check-exhaustiveness (style type clauses env)
Package

serapeum.

Source

control-flow.lisp.

Function: check-match-exhaustive (union clauses env)
Package

serapeum.

Source

defining-types.lisp.

Function: check-no-dynamic-extent (names declarations)

Check that none of NAMES are declared ‘dynamic-extent’ in DECLARATIONS.

Package

serapeum/static-let.

Source

static-let.lisp.

Function: check-no-underscores (holes)
Package

serapeum.

Source

control-flow.lisp.

Function: check-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: check-same-test (ht1 ht2)

Check that HT1 and HT2, two hash tables, have the same value for ‘hash-table-test’.

This should work even for "custom" hash tables with user-defined tests.

Package

serapeum.

Source

hash-tables.lisp.

Function: clause-leading-type (clause)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: clauses+default (clauses &key default-keys)
Package

serapeum.

Source

macro-tools.lisp.

Function: collect-fallthrough-clauses (branch more-branches &optional env)

Collect fallthrough clauses from MORE-BRANCHES into BRANCH.

Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: conditional-error (name)
Package

serapeum.

Source

types.lisp.

Function: constructor= (x y)
Package

serapeum.

Source

defining-types.lisp.

Function: copy-agroup (agroup1 &key exemplar bucket)

Copy an instance of AGROUP, optionally overriding some or all of its slots.

Package

serapeum.

Source

sequences.lisp.

Function: copy-bounds (bounds1 &key start1 end1 start2 end2)

Copy an instance of BOUNDS, optionally overriding some or all of its slots.

Package

serapeum/vector=.

Source

vector=.lisp.

Function: copy-box (instance)
Package

serapeum.

Source

box.lisp.

Function: copy-hash-table/empty (table &key test size rehash-size rehash-threshold)

Make a hash table with the same parameters (test, size, &c.) as TABLE, but empty.

Package

serapeum.

Source

hash-tables.lisp.

Function: copy-heap (instance)
Package

serapeum.

Source

heap.lisp.

Function: copy-string (x)
Package

serapeum.

Source

strings.lisp.

Function: copy-subenv (subenv1 &key vars funs blocks tags)

Copy an instance of SUBENV, optionally overriding some or all of its slots.

Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: count-cpus-string (&key online)
Package

serapeum.

Source

threads.lisp.

Function: count-range (start &optional end step)

Return a vector of ascending positive integers.

With one argument, return all the integers in the interval [0,end).

With two arguments, return all the integers in the interval [start,end).

With three arguments, return the integers in the interval [start,end) whose difference from START is evenly divisible by STEP.

Package

serapeum.

Source

range.lisp.

Function: count-range/1 (end)
Package

serapeum.

Source

range.lisp.

Function: count-range/2 (start end)
Package

serapeum.

Source

range.lisp.

Function: count-range/3 (start end step)
Package

serapeum.

Source

range.lisp.

Function: declared-ftype (fn decls &optional env)

If DECLS contains an ftype declaration for FN, return it.
Returns three values. The first two values are the arguments type and return type. The third is a boolean, which is ‘t’ only when there was an ftype declaration.

Package

serapeum.

Source

fbind.lisp.

Function: default-tie-breaker (min-elts constraints)

The default tie breaker for a topological sort.

Package

serapeum.

Source

sequences.lisp.

Function: delete* (item sequence &key from-end test start end count key)

Like ‘delete’ but return (values NEW-SEQUENCE FOUNDP) with FOUNDP being T if the element was found, NIL otherwise.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: describe-non-exhaustive-match (stream partition type env)
Package

serapeum.

Source

control-flow.lisp.

Function: digit-length (n &optional base)
Package

serapeum.

Source

strings.lisp.

Function: displace (array shape &optional offset)

Shorthand function for displacing an array.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: double-float-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: ensure-monitor (object string)
Package

serapeum.

Source

threads.lisp.

Function: ensure-shape (x)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: ensure-var (var)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: env-super (env &optional default)

Look for the superclass bound in ENV.

Package

serapeum.

Source

defining-types.lisp.

Function: escape/no-arg-parsing (string table start end stream)
Package

serapeum.

Source

strings.lisp.

Function: expand-binding (bind)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: expand-bindings (bindings)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: expand-case-macro (cont expr clauses &key default-keys error macro-name)
Package

serapeum.

Source

macro-tools.lisp.

Function: expand-case-macro/common (clauses &key jump macro-name)
Package

serapeum.

Source

macro-tools.lisp.

Function: expand-case-macro/flet (cont expr-temp normal-clauses default &key macro-name)
Package

serapeum.

Source

macro-tools.lisp.

Function: expand-case-macro/tagbody (cont expr-temp normal-clauses default &key macro-name)
Package

serapeum.

Source

macro-tools.lisp.

Function: expand-char-case-keys (clauses)
Package

serapeum.

Source

tree-case.lisp.

Function: expand-destructuring-case-of (type key clauses case-of)
Package

serapeum.

Source

control-flow.lisp.

Function: expand-dispatch-caseql-clauses (clauses)
Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: expand-fbindings (bindings)
Package

serapeum.

Source

fbind.lisp.

Function: expand-href (table keys)
Package

serapeum.

Source

hash-tables.lisp.

Function: expand-mvfold (fn seq seeds &optional from-end)
Package

serapeum.

Source

sequences.lisp.

Function: expand-nest (things)

Helper function for ‘nest’.

Package

serapeum.

Source

control-flow.lisp.

Function: expand-pad-x (call fn env vec len pad)

Auxiliary function for ‘pad-X’ compiler macros. Optimizes some cases where PAD is a constant sequence.

Package

serapeum.

Source

vectors.lisp.

Function: expand-read-only-var (var env)
Package

serapeum.

Source

macro-tools.lisp.

Function: expand-variadic-equality (binary variadic args)
Package

serapeum.

Source

control-flow.lisp.

Function: explode-type (type env)

Extract the individual types from a type defined as a disjunction. TYPE could be the actual disjunction, or the name of the type.

If TYPE is not a disjunction, just return TYPE as a list.

Note that ‘member’ types are disjunctions:

(explode-type (member :x :y :z) nil)
=> ((eql :x) (:eql y) (eql :z))

Package

serapeum.

Source

control-flow.lisp.

Function: exponent-char-format (exponent-char)
Package

serapeum.

Source

numbers.lisp.

Function: exponent-char? (char)
Package

serapeum.

Source

numbers.lisp.

Function: extract-function-name (x)

If possible, extract the name from X, a function designator.

Package

serapeum.

Source

macro-tools.lisp.

Function: extract-op-env (body env)
Package

serapeum/op.

Source

op.lisp.

Function: extract-tagbody-tags (body)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: file=/loop (file1 file2 &key buffer-size)

Compare two files by looping over their contents using a buffer.

Package

serapeum.

Source

files.lisp.

Function: fill-int-range! (vect start stop step)
Package

serapeum.

Source

range.lisp.

Function: filter/counted (pred seq &rest args &key count from-end start end key)

Helper for FILTER.

Package

serapeum.

Source

sequences.lisp.

Function: filter/swapped-arguments (seq pred &rest args &key &allow-other-keys)
Package

serapeum.

Source

sequences.lisp.

Function: frange (start stop step)

Perform floating-point contagion on START, STOP, and STEP, and call ‘range’ on the results.

Package

serapeum.

Source

range.lisp.

Function: free? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: fun (name init)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: gensym? (x)

Is X a gensym’d (uninterned) symbol?

Package

serapeum.

Source

fbind.lisp.

Reader: heap-key (instance)
Writer: (setf heap-key) (instance)
Package

serapeum.

Source

heap.lisp.

Target Slot

key.

Function: heap-left (i)
Package

serapeum.

Source

heap.lisp.

Function: heap-p (object)
Package

serapeum.

Source

heap.lisp.

Function: heap-parent (i)
Package

serapeum.

Source

heap.lisp.

Function: heap-right (i)
Package

serapeum.

Source

heap.lisp.

Reader: heap-test (instance)
Writer: (setf heap-test) (instance)
Package

serapeum.

Source

heap.lisp.

Target Slot

test.

Reader: heap-vector (instance)
Package

serapeum.

Source

heap.lisp.

Target Slot

vector.

Function: heapify (vec start key test)
Package

serapeum.

Source

heap.lisp.

Function: hoist-clause-bodies (block clauses env)

Hoist the bodies of the clauses into tags.
This is needed because the same clause may be spliced into the dispatch-case form in several places (in order to implement fallthrough).

Returns two values: a list of alternating tags and forms, and a list of clauses rewritten to jump to the tags.

Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: ignored-functions-in-body (body)
Package

serapeum.

Source

fbind.lisp.

Function: ignored-functions-in-decls (decls)
Package

serapeum.

Source

fbind.lisp.

Function: include+opts (opts)
Package

serapeum.

Source

defining-types.lisp.

Function: initialize-binds-from-decls (binds-in decls &optional env)

Given a list of bindings and a set of declarations, look for any uninitialized bindings. If there are any, try to extrapolate reasonable initialization values for them based on the declarations in DECLS.

Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Reader: initializedp (instance)
Writer: (setf initializedp) (instance)
Package

serapeum/static-let.

Source

static-let.lisp.

Target Slot

initializedp.

Function: insert-superclass (superclass list)
Package

serapeum/mop.

Source

mop.lisp.

Function: int-range-shape (start stop step)

Return the length and element type for a range vector from START to STOP by STEP.

Package

serapeum.

Source

range.lisp.

Function: integer-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: intern-unit (name ctor)
Package

serapeum.

Source

defining-types.lisp.

Function: intersperse/list (new-elt list)
Package

serapeum.

Source

sequences.lisp.

Function: intersperse/seq (new-elt seq)
Package

serapeum.

Source

sequences.lisp.

Function: invalid (&rest args)
Package

serapeum.

Source

fbind.lisp.

Function: key-test (key test &optional test-not)

Return a function of two arguments which uses KEY to extract the part of the arguments to compare, and compares them using TEST.

Package

serapeum.

Source

sequences.lisp.

Function: lambda-list-vars (lambda-list)

Return a list of the variables bound in LAMBDA-LIST, an ordinary lambda list.

Package

serapeum.

Source

macro-tools.lisp.

Function: let-over-lambda (form lexenv)

Expand form, using ‘expand-macro’. If the result is a simple let-over-lambda, analyze it into an environment, declarations, and a lambda.

Package

serapeum.

Source

fbind.lisp.

Return a list of all of the items in ARRAYS.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: list+length (list start end)
Package

serapeum.

Source

lists.lisp.

Function: list-collapse-duplicates (test key list)
Package

serapeum.

Source

sequences.lisp.

Function: list-map-from-end/bordeaux (fun list &key start end)

Traverse LIST from the end, calling FUN on each item.

This uses the technique described by Durand and Strandh in their paper presented at ECLS 2015, “Processing List Elements in Reverse Order.”

Package

serapeum.

Source

lists.lisp.

Function: list-runs (list start end key test count compare-last)
Package

serapeum.

Source

sequences.lisp.

Reader: lock (instance)
Package

serapeum/static-let.

Source

static-let.lisp.

Target Slot

lock.

Function: lock-form (object objectp env string)
Package

serapeum.

Source

threads.lisp.

Function: long-float-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: longest-list (lists)

Find the longest list in LISTS.

Package

serapeum.

Source

sequences.lisp.

Function: longest-seq (seqs)
Package

serapeum.

Source

sequences.lisp.

Function: macro (name init)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: make-active-groups-binding (bindings)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-bucket (seq &optional init)

Return a "bucket" suitable for collecting elements from SEQ.

If SEQ is restricted as to the type of elements it can hold (for example, if SEQ is an array with an element type) the same restriction will apply to the bucket.

Package

serapeum.

Source

sequences.lisp.

Function: make-float (number divisor &optional format)
Package

serapeum.

Source

numbers.lisp.

Function: make-flusher (x)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-handler (fn &key class-name name handler-type place value)

Return a ‘handler’.
NAME is only mandatory if FN is a lambda.
CLASS-NAME can be used to create handler subclasses.

HANDLER-TYPE, PLACE and VALUE are as per the sltos in ‘handler-type’.

This function should not be used directly.
Prefer the typed make-handler-* functions instead.

Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: make-initform (x)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-let-binding (x)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-macrolet-binding (x)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-op-env (&rest args &key &allow-other-keys)
Package

serapeum/op.

Source

op.lisp.

Function: make-queue ()
Package

serapeum.

Source

queue.lisp.

Function: make-queue-cons ()
Package

serapeum.

Source

queue.lisp.

Function: make-sequence-like (seq len &rest args &key initial-element initial-contents)

Helper function: make a sequence of length LEN having the same type as SEQ.

Package

serapeum.

Source

sequences.lisp.

Function: make-static-binding (&key once name read-only)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-type-declaration (x)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: make-unique-name-list (length &optional x)

Alias for ‘alexandria:make-gensym-list’.

Package

serapeum.

Source

macro-tools.lisp.

Function: map-splits (fn split-fn seq start end from-end)
Package

serapeum.

Source

sequences.lisp.

Function: map-splits-from-end (fn split-fn seq start end)
Package

serapeum.

Source

sequences.lisp.

Function: map-splits-from-start (fn split-fn seq start end)
Package

serapeum.

Source

sequences.lisp.

Function: map-subseq (fn seq &optional start end from-end)

Helper function to map SEQ between START and END.

Package

serapeum.

Source

sequences.lisp.

Function: map-tree/inorder (fun tree tag tagp)
Package

serapeum.

Source

trees.lisp.

Function: map-tree/postorder (fun tree tag tagp)
Package

serapeum.

Source

trees.lisp.

Function: map-tree/preorder (fun tree tag tagp)
Package

serapeum.

Source

trees.lisp.

Function: mapconcat/list (fun list sep stream)
Package

serapeum.

Source

strings.lisp.

Function: mapconcat/seq (fun seq sep stream)
Package

serapeum.

Source

strings.lisp.

Function: merely-syntactic-functions (names body-with-decls env)

Which functions in NAMES are merely syntactic?

Functions are "merely syntactic" if they are never dereferenced with ‘function’ (or sharp-quote).

This function may return false negatives – it may fail to detect that a function is syntactic – but it should never return a false positive – it should never say a function is syntactic when it is not.

Package

serapeum.

Source

fbind.lisp.

Function: merge-tables! (table &rest tables)
Package

serapeum.

Source

hash-tables.lisp.

Function: missing-branch (name)
Package

serapeum.

Source

types.lisp.

Function: move-hook-handlers (hook source-handlers-slot destination-handlers-slot select-handlers)
Package

serapeum/contrib/hooks.

Source

hooks.lisp.

Function: mutual-element-type (arrays)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: mvfold-aux (fn seq seeds &optional from-end)
Package

serapeum.

Source

sequences.lisp.

Reader: name (instance)
Writer: (setf name) (instance)
Package

serapeum/static-let.

Source

static-let.lisp.

Target Slot

name.

Function: normalize-cases (cases &key allow-default)

Normalize CASES, clauses for a case-like macro.
Return each non-default clause normalized to ‘(keys . body)’, where keys is a *list* of keys.

Return the default clause as a second value.

If there is more than one default clause, signal an error.

Package

serapeum.

Source

macro-tools.lisp.

Function: nsplice-list (list new start end)
Package

serapeum.

Source

sequences.lisp.

Function: nsplice-vector (vector new start end)
Package

serapeum.

Source

sequences.lisp.

Function: numbered-placeholder? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: octet-vector=/unsafe (v1 v2 start1 end1 start2 end2)
Package

serapeum.

Source

octets.lisp.

Function: pairwise (fn xs)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: parse-defmethod-args (args)

Parse the args to defmethod (everything except the name). Returns three values: a list of qualifiers, the specialized lambda-list, and the forms that make up the body.

Package

serapeum.

Source

macro-tools.lisp.

Function: parse-static-let (bindings body)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: parse-static-let* (bindings body env)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: partition-declarations-by-kind (simple complex lambda decls)
Package

serapeum.

Source

fbind.lisp.

Function: partition-fbinds (fbinds body)

Partition FBINDS using the "Fixing Letrec" algorithm.
Returns the bindings in four sets: unreferenced, literal lambdas, simple (external references) and complex (everything else).

BODY is needed because we detect unreferenced bindings by looking for ‘ignore’ declarations.

Package

serapeum.

Source

fbind.lisp.

Function: pattern-type (pattern union)

Return two values: the type and the final pattern.

Package

serapeum.

Source

defining-types.lisp.

Function: placeholder? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: policy-quality (quality &optional env)

Query ENV for optimization declaration information. Returns 1 when the environment cannot be accessed.

Package

serapeum.

Source

macro-tools.lisp.

Function: policy> (env policy1 policy2)
Package

serapeum.

Source

macro-tools.lisp.

Function: prepare-int-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: print-constructor (object stream fields)
Package

serapeum.

Source

defining-types.lisp.

Function: print-unit (object stream depth)
Package

serapeum.

Source

defining-types.lisp.

Function: proper-alist? (x &optional cutoff)
Package

serapeum.

Source

types.lisp.

Function: proper-list-without-nil? (x &optional cutoff)
Package

serapeum.

Source

types.lisp.

Function: proper-list? (x &optional cutoff)
Package

serapeum.

Source

types.lisp.

Reader: queue-cons (instance)
Package

serapeum.

Source

queue.lisp.

Target Slot

cons.

Function: quickselect (a k lt)

Hoare’s quickselect, as implemented by Wirth ("FIND"), with refinements by V. Zabrodsky ("MODIFIND").

Package

serapeum.

Source

sequences.lisp.

Function: quotation? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: quote-unless-constant (value &optional env)
Package

serapeum.

Source

defining-types.lisp.

Function: random-range-type (low high)
Package

serapeum.

Source

numbers.lisp.

Function: range-error (start stop step)
Package

serapeum.

Source

range.lisp.

Function: read-float (stream junk-allowed type)
Package

serapeum.

Source

numbers.lisp.

Function: read-float-aux (stream junk-allowed type)
Package

serapeum.

Source

numbers.lisp.

Function: read-new-value ()

Read and evaluate a value.

Package

serapeum.

Source

types.lisp.

Reader: read-only (instance)
Writer: (setf read-only) (instance)
Package

serapeum/static-let.

Source

static-let.lisp.

Target Slot

read-only.

Function: read-only-include-clause (name clause &optional env)

Rewrite CLAUSE, an include clause, for use with a read-only structure.

Package

serapeum.

Source

defining-types.lisp.

Function: read-only-slotdef (slot)

Rewrite SLOT, a structure slot definition, to be read-only.
Note that if SLOT is of an odd length, then it is treated as being without an initialization form, and a default initialization form that raises an error is supplied.

Package

serapeum.

Source

defining-types.lisp.

Function: real-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: reduce-between (fn xs start end)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: reduce-vector-pairwise (fun xs)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: reify-bounds (vec1 vec2 start1 end1 start2 end2)
Package

serapeum/vector=.

Source

vector=.lisp.

Function: remove-duplicated-subtypes (subtypes)
Package

serapeum.

Source

types.lisp.

Function: remove-shadowed (binds &optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: remove-shadowed-clauses (clauses &optional env)

Given a list of typecase clauses, remove any clauses that are shadowed by previous clauses.

Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: remove-shadowed-subtypes (subtypes)
Package

serapeum.

Source

types.lisp.

Function: repeat-list (list n)
Package

serapeum.

Source

sequences.lisp.

Function: repeat-vector (vec n)
Package

serapeum.

Source

sequences.lisp.

Function: replace* (out in)

Like ‘replace’ with no keyword arguments, but if IN is shorter than OUT, extend it cyclically.

In the base case, if IN is empty, leave OUT alone.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: report-group-substring (&key group all-groups-p)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: report-static-binding-active-error (condition stream)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: report-static-binding-flush-error (condition stream)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: require-type (datum spec)
Package

serapeum.

Source

types.lisp.

Function: require-type-for (datum spec place)
Package

serapeum.

Source

types.lisp.

Function: rest-op? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: rest-placeholder? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: rotation (seq n)

Like ‘rotate’, but non-destructive.

Package

serapeum.

Source

sequences.lisp.

Function: same-literal-p (x y)

A predicate that compares whether X and Y have the same literal representation.

Package

serapeum.

Source

definitions.lisp.

Function: same-test? (ht1 ht2)

Do two hash tables have the same test?

Package

serapeum.

Source

hash-tables.lisp.

Function: same-type? (type1 type2 &optional env)

Like ‘alexandria:type=’, but takes an environment.

Package

serapeum.

Source

control-flow.lisp.

Function: seq=/2 (x y)
Package

serapeum.

Source

sequences.lisp.

Function: setslice (seq1 seq2 start &optional end)

Helper to ‘set’ a slice non-destructively.

Package

serapeum.

Source

sequences.lisp.

Function: shadow-names (binds)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: shape= (array1 array2)

Return true if ARRAY1 and ARRAY2 have the same shape.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: short-float-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: shortest-list (lists)

Find the shortest list in LISTS.

Package

serapeum.

Source

sequences.lisp.

Function: shortest-seq (seqs)
Package

serapeum.

Source

sequences.lisp.

Function: shortest/longest (seqs extreme-seq extreme-list length-predicate)
Package

serapeum.

Source

sequences.lisp.

Function: shrink-wrap (object shape)

Make an array of shape SHAPE containing OBJECT as its initial element. The array will have the smallest element type sufficient to contain OBJECT.

Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.

Function: simple-binding-p (binding)
Package

serapeum.

Source

binding.lisp.

Function: simple-lambda-list? (lambda-list)

A lambda list with no inits.

Package

serapeum.

Source

fbind.lisp.

Function: simplify-args-for-string-plus (args &optional env)
Package

serapeum.

Source

strings.lisp.

Function: simplify-keylists (clauses)

Simplify the keylists in CLAUSES.

If the keylist is an empty list, omit the clause.

If the keylist is a list with one element, unwrap that element.

Otherwise, leave the keylist alone.

Package

serapeum.

Source

macro-tools.lisp.

Function: simplify-string (string)
Package

serapeum.

Source

strings.lisp.

Function: simplify-subtypes (subtypes)
Package

serapeum.

Source

types.lisp.

Function: single-float-range (start stop step)
Package

serapeum.

Source

range.lisp.

Function: slice-bounds (len start end)

Normalize START and END, which may be negative, to offsets acceptable to SUBSEQ.

Package

serapeum.

Source

sequences.lisp.

Function: sort-clauses (clauses &optional env)

Given a list of typecase clauses, order them so no preceding clause shadows later ones, if possible.

Package

serapeum/dispatch-case.

Source

dispatch-case.lisp.

Function: sort-subtypes (subtypes)
Package

serapeum.

Source

types.lisp.

Function: sorting-network (size)
Package

serapeum.

Source

control-flow.lisp.

Function: speed-matters? (env)

Return T if ENV says we should prefer space to speed.

Package

serapeum.

Source

macro-tools.lisp.

Function: splice-list (list new start end)
Package

serapeum.

Source

sequences.lisp.

Function: splice-vector (vector new start end)
Package

serapeum.

Source

sequences.lisp.

Function: split-at (list k)
Package

serapeum.

Source

sequences.lisp.

Function: string-case-failure (expr keys)
Package

serapeum.

Source

control-flow.lisp.

Function: subenv (vars funs blocks tags)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Reader: subenv-blocks (instance)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Target Slot

blocks.

Function: subenv-empty? ()
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Reader: subenv-funs (instance)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Target Slot

funs.

Reader: subenv-tags (instance)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Target Slot

tags.

Reader: subenv-vars (instance)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Target Slot

vars.

Function: subtypes-exhaustive? (type subtypes &optional env)
Package

serapeum.

Source

types.lisp.

Function: sym-numbered-placeholder? (x)
Package

serapeum/op.

Source

op.lisp.

Function: sym-rest-arg? (x)
Package

serapeum/op.

Source

op.lisp.

Function: sym-underscore? (x)
Package

serapeum/op.

Source

op.lisp.

Function: symbol-macro (name init)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: symbol-macro-bindings (&optional subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: tagbody-tag? (form)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: test-fn (test)
Package

serapeum/vector=.

Source

vector=.lisp.

Function: test-kind (test)
Package

serapeum/vector=.

Source

vector=.lisp.

Function: test-load-time-value (fn form read-only-p)
Package

serapeum.

Source

portability.lisp.

Function: thread-aux (threader needle holes thread-fn)
Package

serapeum.

Source

control-flow.lisp.

Function: tsort (elts constraints tie-breaker &key test)
Package

serapeum.

Source

sequences.lisp.

Function: tsort/hash-table (objects constraints tie-breaker &key test)
Package

serapeum.

Source

sequences.lisp.

Function: tsort/list (elts constraints tie-breaker &key test)

Do the initial topological sort.

Package

serapeum.

Source

sequences.lisp.

Function: type-vref (type)
Package

serapeum.

Source

types.lisp.

Function: unbound (var)
Package

serapeum.

Source

definitions.lisp.

Function: unbound-p (object)
Package

serapeum.

Source

definitions.lisp.

Reader: unbound-var (instance)
Package

serapeum.

Source

definitions.lisp.

Target Slot

var.

Reader: value (instance)
Writer: (setf value) (instance)
Package

serapeum/static-let.

Source

static-let.lisp.

Target Slot

value.

Function: value-ref (static-binding)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: (setf value-ref) (static-binding)
Package

serapeum/static-let.

Source

static-let.lisp.

Function: var (name init)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: var-lexical? (x env)
Package

serapeum/op.

Source

op.lisp.

Function: variable-special? (var &optional env)
Package

serapeum.

Source

macro-tools.lisp.

Function: variable-type (var &optional env)
Package

serapeum.

Source

macro-tools.lisp.

Function: vector-kind (v)
Package

serapeum/vector=.

Source

vector=.lisp.

Function: visible-of-type (type subenv)
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Function: void (x)
Package

serapeum/generalized-arrays.

Source

generalized-arrays.lisp.


6.2.7 Generic functions

Generic Function: %constructor= (x y)
Package

serapeum.

Source

defining-types.lisp.

Methods
Method: %constructor= ((o1 subenv) (o2 subenv))
Source

internal-definitions.lisp.

Method: %constructor= ((o1 bounds) (o2 bounds))
Source

vector=.lisp.

Method: %constructor= ((o1 agroup) (o2 agroup))
Source

sequences.lisp.

Method: %constructor= (x y)
Generic Function: alias-decls (self decls)
Package

serapeum/internal-definitions.

Methods
Method: alias-decls ((self internal-definitions-env) decls)
Source

internal-definitions.lisp.

Generic Reader: args-of (condition)
Generic Writer: (setf args-of) (condition)
Package

serapeum.

Methods
Reader Method: args-of ((condition letrec-restriction-violation))
Writer Method: (setf args-of) ((condition letrec-restriction-violation))
Source

fbind.lisp.

Target Slot

args.

Generic Function: at-beginning? (self)
Package

serapeum/internal-definitions.

Methods
Method: at-beginning? ((self internal-definitions-env))

Return non-nil if this is the first form in the ‘local’.

Source

internal-definitions.lisp.

Generic Reader: binding-init (object)
Package

serapeum/internal-definitions.

Methods
Reader Method: binding-init ((%binding %binding))

automatically generated reader method

Source

internal-definitions.lisp.

Target Slot

init.

Generic Reader: binding-name (object)
Package

serapeum/internal-definitions.

Methods
Reader Method: binding-name ((%binding %binding))

automatically generated reader method

Source

internal-definitions.lisp.

Target Slot

name.

Generic Function: bounds-plausible? (bounds v1 v2)
Package

serapeum/vector=.

Source

vector=.lisp.

Methods
Method: bounds-plausible? ((bounds null) v1 v2)
Method: bounds-plausible? ((bounds bounds) v1 v2)
Generic Function: check-beginning (self offender)
Package

serapeum/internal-definitions.

Methods
Method: check-beginning ((self internal-definitions-env) offender)
Source

internal-definitions.lisp.

Generic Function: compare-elements (kind1 kind2 test-kind bounds)
Package

serapeum/vector=.

Source

vector=.lisp.

Methods
Method: compare-elements ((v1 vector) (v2 vector) test (bounds bounds))
Method: compare-elements ((v1 vector) (v2 vector) test (bounds null))
Method: compare-elements ((v1 vector) (v2 vector) (test test/equalp) (bounds null))
Method: compare-elements ((v1 simple-array-unsigned-byte-8) (v2 simple-array-unsigned-byte-8) (test test/rat=) (bounds bounds))
Method: compare-elements ((v1 simple-array-unsigned-byte-8) (v2 simple-array-unsigned-byte-8) (test test/rat=) (bounds null))
Method: compare-elements ((v vector) (w vector-wrapper) test bounds)
Method: compare-elements ((w vector-wrapper) (v vector) test bounds)
Method: compare-elements ((w1 vector-wrapper) (w2 vector-wrapper) test bounds)
Method: compare-elements ((w1 rat-vector) (w2 rat-vector) (test test/rat=) (bounds null))
Method: compare-elements ((w1 numeric-vector) (w2 numeric-vector) (test test/=) (bounds null))
Method: compare-elements ((v1 bit-vector) (v2 bit-vector) (test test/rat=) (bounds bounds))
Method: compare-elements ((v1 bit-vector) (v2 bit-vector) (test test/rat=) (bounds null))
Method: compare-elements ((s1 string) (s2 string) (test test/char-equal) (bounds bounds))
Method: compare-elements ((s1 string) (s2 string) (test test/char=) (bounds bounds))
Method: compare-elements ((s1 string) (s2 string) (test test/char-equal) (bounds null))
Method: compare-elements ((s1 string) (s2 string) (test test/char=) (bounds null))
Generic Function: constructor-values/generic (x)
Package

serapeum.

Source

defining-types.lisp.

Methods
Method: constructor-values/generic ((x subenv))
Source

internal-definitions.lisp.

Method: constructor-values/generic ((x bounds))
Source

vector=.lisp.

Method: constructor-values/generic ((x agroup))
Source

sequences.lisp.

Generic Reader: dispatch-case-error-matched-types (condition)
Package

serapeum/dispatch-case.

Methods
Reader Method: dispatch-case-error-matched-types ((condition dispatch-case-error))
Source

dispatch-case.lisp.

Target Slot

matched-types-slot.

Generic Function: eject-macro (self name wrapper)
Package

serapeum/internal-definitions.

Methods
Method: eject-macro ((self internal-definitions-env) name wrapper)
Source

internal-definitions.lisp.

Generic Function: ensure-var-alias (self var)
Package

serapeum/internal-definitions.

Methods
Method: ensure-var-alias ((self internal-definitions-env) var)
Source

internal-definitions.lisp.

Generic Function: equals (fn1 fn2)
Package

serapeum/contrib/hooks.

Methods
Method: equals ((fn1 handler) (fn2 handler))

Return non-nil if FN1 and FN2 are equal.
Handlers are equal if they are setters of the same place and same value, or if their names are equal.

Source

hooks.lisp.

Generic Function: expand-body (self body)
Package

serapeum/internal-definitions.

Methods
Method: expand-body ((self internal-definitions-env) body)

Shorthand for recursing on an implicit ‘progn’.

Source

internal-definitions.lisp.

Generic Function: expand-in-env (self form &optional env)
Package

serapeum/internal-definitions.

Methods
Method: expand-in-env ((self internal-definitions-env) form &optional env)
Source

internal-definitions.lisp.

Generic Function: expand-in-env-1 (self form &optional env)
Package

serapeum/internal-definitions.

Methods
Method: expand-in-env-1 ((self internal-definitions-env) form &optional env)

Like macroexpand-1, but handle local symbol macro bindings.

Source

internal-definitions.lisp.

Generic Function: expand-partially (self form)
Package

serapeum/internal-definitions.

Methods
Method: expand-partially ((self internal-definitions-env) form)

Macro-expand FORM until it becomes a definition form or macro expansion stops.

Source

internal-definitions.lisp.

Generic Function: expand-top (self forms)
Package

serapeum/internal-definitions.

Methods
Method: expand-top ((self internal-definitions-env) forms)
Source

internal-definitions.lisp.

Generic Function: expansion-done (self form)
Package

serapeum/internal-definitions.

Methods
Method: expansion-done ((self internal-definitions-env) form)
Source

internal-definitions.lisp.

Generic Function: generate-internal-definitions (self body)
Package

serapeum/internal-definitions.

Methods
Method: generate-internal-definitions ((self internal-definitions-env) body)
Source

internal-definitions.lisp.

Generic Reader: handler-class (object)
Package

serapeum/contrib/hooks.

Methods
Reader Method: handler-class ((hook hook))

The class of the supported handlers.

Source

hooks.lisp.

Target Slot

handler-class.

Generic Function: hoisted-var? (self var)
Package

serapeum/internal-definitions.

Methods
Method: hoisted-var? ((self internal-definitions-env) var)
Source

internal-definitions.lisp.

Generic Function: in-subenv? (self)
Package

serapeum/internal-definitions.

Methods
Method: in-subenv? ((self internal-definitions-env))

Are we within a binding form?

Source

internal-definitions.lisp.

Generic Function: known-var? (self var)
Package

serapeum/internal-definitions.

Methods
Method: known-var? ((self internal-definitions-env) var)
Source

internal-definitions.lisp.

Generic Function: op-env-lambda (op-env)
Package

serapeum/op.

Methods
Method: op-env-lambda ((op-env op-env))
Source

op.lisp.

Generic Function: read-only-struct-slot-names (x)
Package

serapeum.

Source

defining-types.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: read-only-struct-slot-names append ((self subenv))
Source

internal-definitions.lisp.

Method: read-only-struct-slot-names append ((self bounds))
Source

vector=.lisp.

Method: read-only-struct-slot-names append ((self agroup))
Source

sequences.lisp.

Method: read-only-struct-slot-names append ((self unbound))
Source

definitions.lisp.

Method: read-only-struct-slot-names append (x)
Generic Function: save-symbol-macro (self name exp)
Package

serapeum/internal-definitions.

Methods
Method: save-symbol-macro ((self internal-definitions-env) name exp)
Source

internal-definitions.lisp.

Generic Function: shadow-symbol-macro (self name)
Package

serapeum/internal-definitions.

Methods
Method: shadow-symbol-macro ((self internal-definitions-env) name)
Source

internal-definitions.lisp.

Generic Function: splice-forms (self spliced-forms)
Package

serapeum/internal-definitions.

Methods
Method: splice-forms ((self internal-definitions-env) spliced-forms)
Source

internal-definitions.lisp.

Generic Function: step-expansion (self form)
Package

serapeum/internal-definitions.

Methods
Method: step-expansion ((self internal-definitions-env) form)
Source

internal-definitions.lisp.

Generic Function: test.fn (test)
Package

serapeum/vector=.

Source

vector=.lisp.

Methods
Method: test.fn ((test test/eq))
Method: test.fn ((test test/eql))
Method: test.fn ((test test/equal))
Method: test.fn ((test test/char=))
Method: test.fn ((test test/char-equal))
Method: test.fn ((test test/=))
Method: test.fn ((test test/equalp))
Method: test.fn ((test function))
Generic Reader: topmost-class (object)
Package

serapeum/mop.

Methods
Reader Method: topmost-class ((topmost-object-class topmost-object-class))

automatically generated reader method

Source

mop.lisp.

Target Slot

topmost-class.

Generic Reader: unwrap (object)
Package

serapeum/vector=.

Methods
Reader Method: unwrap ((vector-wrapper vector-wrapper))

automatically generated reader method

Source

vector=.lisp.

Target Slot

vector.

Generic Function: var-alias-bindings (self)
Package

serapeum/internal-definitions.

Methods
Method: var-alias-bindings ((self internal-definitions-env))
Source

internal-definitions.lisp.

Generic Function: wrap-bindings (self bindings)
Package

serapeum/internal-definitions.

Methods
Method: wrap-bindings ((self internal-definitions-env) bindings)
Source

internal-definitions.lisp.

Generic Function: wrap-expr (self form)
Package

serapeum/internal-definitions.

Methods
Method: wrap-expr ((self internal-definitions-env) form)
Source

internal-definitions.lisp.

Generic Function: wrap-fn-bindings (self bindings)
Package

serapeum/internal-definitions.

Methods
Method: wrap-fn-bindings ((self internal-definitions-env) bindings)
Source

internal-definitions.lisp.


6.2.8 Structures

Structure: %read-only-struct

Abstract base class for read-only structures.

Package

serapeum.

Source

defining-types.lisp.

Direct superclasses

structure-object.

Direct subclasses
Direct methods

make-load-form.

Structure: %unit

Abstract base class for unit classes.

Package

serapeum.

Source

defining-types.lisp.

Direct superclasses

%read-only-struct.

Structure: agroup

Auxiliary data structure for ‘assort’. A pair of an exemplar (to compare against) and a bucket of matching items. Note that while the agroup is immutable, the bucket itself is mutable.

Package

serapeum.

Source

sequences.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: exemplar
Initform

(alexandria:required-argument (quote serapeum::exemplar))

Readers

agroup-exemplar.

Writers

This slot is read-only.

Slot: bucket
Initform

(alexandria:required-argument (quote serapeum::bucket))

Readers

agroup-bucket.

Writers

This slot is read-only.

Structure: bounds
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: start1
Type

alexandria:array-index

Initform

(alexandria:required-argument (quote serapeum/vector=::start1))

Readers

bounds-start1.

Writers

This slot is read-only.

Slot: end1
Type

alexandria:array-length

Initform

(alexandria:required-argument (quote serapeum/vector=::end1))

Readers

bounds-end1.

Writers

This slot is read-only.

Slot: start2
Type

alexandria:array-index

Initform

(alexandria:required-argument (quote serapeum/vector=::start2))

Readers

bounds-start2.

Writers

This slot is read-only.

Slot: end2
Type

alexandria:array-length

Initform

(alexandria:required-argument (quote serapeum/vector=::end2))

Readers

bounds-end2.

Writers

This slot is read-only.

Structure: heap

Create an empty (max) heap.

SIZE is a hint for at least how many items will be used; it is not a limit but providing it speeds up initializing the heap.

ELEMENT-TYPE is like the ‘:element-type’ argument to ‘make-array’. It may, or may not, restrict the element type of the heap, depending on the request type and what the Lisp implementation supports. It is for optimization, not type safety.

KEY and TEST are used to order the heap elements.

Package

serapeum.

Source

heap.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: vector
Package

common-lisp.

Type

vector

Initform

#()

Readers

heap-vector.

Writers

This slot is read-only.

Slot: key
Type

function

Initform

(function identity)

Readers

heap-key.

Writers

(setf heap-key).

Slot: test
Type

function

Initform

(function >=)

Readers

heap-test.

Writers

(setf heap-test).

Structure: static-binding
Package

serapeum/static-let.

Source

static-let.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: name
Type

symbol

Initform

(quote serapeum/static-let::unknown)

Readers

name.

Writers

(setf name).

Slot: value
Readers

value.

Writers

(setf value).

Slot: initializedp
Type

boolean

Readers

initializedp.

Writers

(setf initializedp).

Slot: read-only
Type

boolean

Readers

read-only.

Writers

(setf read-only).

Slot: lock
Type

(or null bordeaux-threads:lock)

Readers

lock.

Writers

This slot is read-only.

Structure: struct-to-try-instantiating
Package

serapeum.

Source

clos.lisp.

Direct superclasses

structure-object.

Structure: subenv

Minimal lexical environment.

Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: vars
Type

list

Initform

(alexandria:required-argument (quote serapeum/internal-definitions::vars))

Readers

subenv-vars.

Writers

This slot is read-only.

Slot: funs
Type

list

Initform

(alexandria:required-argument (quote serapeum/internal-definitions::funs))

Readers

subenv-funs.

Writers

This slot is read-only.

Slot: blocks
Type

list

Initform

(alexandria:required-argument (quote serapeum/internal-definitions::blocks))

Readers

subenv-blocks.

Writers

This slot is read-only.

Slot: tags
Type

list

Initform

(alexandria:required-argument (quote serapeum/internal-definitions::tags))

Readers

subenv-tags.

Writers

This slot is read-only.

Structure: unbound

Placeholder for an unbound variable.

Package

serapeum.

Source

definitions.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: var
Type

symbol

Initform

(alexandria:required-argument (quote serapeum::var))

Readers

unbound-var.

Writers

This slot is read-only.


6.2.9 Classes

Class: %binding
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name
Type

symbol

Initargs

:name

Readers

binding-name.

Writers

This slot is read-only.

Slot: init
Type

serapeum/internal-definitions::expr

Initargs

:init

Readers

binding-init.

Writers

This slot is read-only.

Class: float-vector
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

numeric-vector.

Class: fun
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct superclasses

%binding.

Class: internal-definitions-env
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct methods
Direct Default Initargs
InitargValue
:envnil
:declsnil
Direct slots
Slot: vars
Type

list

Slot: var-aliases
Type

list

Slot: decls
Type

list

Initargs

:decls

Slot: hoisted-vars
Type

list

Slot: labels
Package

common-lisp.

Type

list

Slot: exprs
Type

list

Slot: global-symbol-macros
Type

list

Slot: env

The Lisp environment.

Initargs

:env

Class: macro
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct superclasses

%binding.

Class: numeric-vector
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

vector-wrapper.

Direct subclasses
Direct methods

compare-elements.

Class: op-env
Package

serapeum/op.

Source

op.lisp.

Direct methods

op-env-lambda.

Direct slots
Slot: body
Type

list

Initargs

:body, :body

Slot: vars
Type

list

Initargs

:vars

Slot: rest-op?
Type

symbol

Initargs

:rest-op?

Class: rat-vector
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

numeric-vector.

Direct methods

compare-elements.

Class: symbol-macro
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct superclasses

%binding.

Class: test/=
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

test/rat=.

Direct subclasses

test/equalp.

Direct methods
Class: test/char-equal
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

test/char=.

Direct subclasses

test/equalp.

Direct methods
Class: test/char=
Package

serapeum/vector=.

Source

vector=.lisp.

Direct subclasses
Direct methods
Class: test/eq
Package

serapeum/vector=.

Source

vector=.lisp.

Direct subclasses

test/eql.

Direct methods

test.fn.

Class: test/eql
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses
Direct subclasses

test/equal.

Direct methods

test.fn.

Class: test/equal
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses

test/eql.

Direct subclasses

test/equalp.

Direct methods

test.fn.

Class: test/equalp
Package

serapeum/vector=.

Source

vector=.lisp.

Direct superclasses
Direct methods
Class: test/rat=
Package

serapeum/vector=.

Source

vector=.lisp.

Direct subclasses
Direct methods
Class: var
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Direct superclasses

%binding.

Class: vector-wrapper
Package

serapeum/vector=.

Source

vector=.lisp.

Direct subclasses

numeric-vector.

Direct methods
Direct slots
Slot: vector
Package

common-lisp.

Type

vector

Initargs

:vector

Readers

unwrap.

Writers

This slot is read-only.


6.2.10 Types

Type: array-size-difference ()
Package

serapeum.

Source

sequences.lisp.

Type: binding ()
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Type: body ()
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Type: expr ()
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Type: false ()
Package

serapeum.

Source

types.lisp.

Type: fixed-print-length-type ()
Package

serapeum.

Source

strings.lisp.

Type: function-name ()
Package

serapeum.

Source

sequences.lisp.

Type: internal-definition-form ()
Package

serapeum/internal-definitions.

Source

internal-definitions.lisp.

Type: key-designator ()
Package

serapeum.

Source

sequences.lisp.

Type: object ()
Package

serapeum.

Source

clos.lisp.

Type: physical-pathname ()
Package

serapeum.

Source

files.lisp.

Type: real* ()
Package

serapeum.

Source

range.lisp.

Type: signed-array-index ()

A (possibly negated) array index.

Package

serapeum.

Source

sequences.lisp.

Type: signed-array-length ()

A (possibly negated) array length.

Package

serapeum.

Source

sequences.lisp.

Type: string-offset ()
Package

serapeum.

Source

strings.lisp.

Type: test-designator ()
Package

serapeum.

Source

sequences.lisp.

Type: variable-name ()
Package

serapeum/static-let.

Source

static-let.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   $   %   (   -   @   ~  
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W  
Index Entry  Section

$
$path: Private ordinary functions

%
%constructor=: Private generic functions
%constructor=: Private generic functions
%constructor=: Private generic functions
%constructor=: Private generic functions
%constructor=: Private generic functions
%do-each: Private macros
%flatten: Private ordinary functions
%flush: Private ordinary functions
%make-static-binding: Private ordinary functions
%require-type: Private ordinary functions
%require-type-for: Private ordinary functions
%with-boolean: Private macros

(
(setf %read-only-var): Private ordinary functions
(setf @): Public compiler macros
(setf @): Public ordinary functions
(setf args-of): Private generic functions
(setf args-of): Private generic functions
(setf bound-value): Public ordinary functions
(setf combination): Public generic functions
(setf combination): Public generic functions
(setf description): Public generic functions
(setf description): Public generic functions
(setf disabled-handlers): Public generic functions
(setf disabled-handlers): Public generic functions
(setf ensure): Public setf expanders
(setf ensure2): Public setf expanders
(setf fn): Public generic functions
(setf fn): Public generic functions
(setf front): Public ordinary functions
(setf handler-type): Public generic functions
(setf handler-type): Public generic functions
(setf handlers): Public generic functions
(setf handlers): Public generic functions
(setf heap-key): Private ordinary functions
(setf heap-test): Private ordinary functions
(setf href): Public compiler macros
(setf href): Public ordinary functions
(setf initializedp): Private ordinary functions
(setf name): Public generic functions
(setf name): Public generic functions
(setf name): Private ordinary functions
(setf nsubseq): Public ordinary functions
(setf place): Public generic functions
(setf place): Public generic functions
(setf qback): Public ordinary functions
(setf read-only): Private ordinary functions
(setf read-only-var): Private macros
(setf slice): Public setf expanders
(setf slot-value-safe): Public setf expanders
(setf unbox): Public ordinary functions
(setf value): Public generic functions
(setf value): Public generic functions
(setf value): Private ordinary functions
(setf value-ref): Private ordinary functions

-
->: Public macros

@
@: Public compiler macros
@: Public ordinary functions

~
~>: Public macros
~>>: Public macros

A
add-hook: Public generic functions
add-hook: Public generic functions
add-hook: Public generic functions
add-hook: Public generic functions
add-hook: Public generic functions
add-hook: Public generic functions
add-hook-internal: Private ordinary functions
agroup: Private ordinary functions
agroup-bucket: Private ordinary functions
agroup-exemplar: Private ordinary functions
alias-decls: Private generic functions
alias-decls: Private generic functions
analyze-fbinds: Private ordinary functions
and-let*: Public macros
append1: Public ordinary functions
args-of: Private generic functions
args-of: Private generic functions
array-index-row-major: Public ordinary functions
array=: Public ordinary functions
ascii-char-p: Public ordinary functions
assocadr: Public ordinary functions
assocar: Public ordinary functions
assocdr: Public ordinary functions
assort: Public ordinary functions
assure: Public macros
assure-values: Private macros
assuref: Public macros
at-beginning?: Private generic functions
at-beginning?: Private generic functions
augment/block: Private ordinary functions
augment/funs: Private ordinary functions
augment/macros: Private ordinary functions
augment/symbol-macros: Private ordinary functions
augment/tags: Private ordinary functions
augment/vars: Private ordinary functions

B
base-path-join: Public ordinary functions
batches: Public ordinary functions
bcond: Public macros
bestn: Public ordinary functions
binding-init: Private generic functions
binding-init: Private generic functions
binding-name: Private generic functions
binding-name: Private generic functions
bisect-left: Public ordinary functions
bisect-right: Public ordinary functions
bits: Public ordinary functions
blankp: Public ordinary functions
block-compile: Public macros
body+vars: Private ordinary functions
body-decls: Private ordinary functions
boolean-if: Public macros
boolean-unless: Public macros
boolean-when: Public macros
bound-value: Public ordinary functions
bounds: Private ordinary functions
bounds-end1: Private ordinary functions
bounds-end2: Private ordinary functions
bounds-plausible?: Private generic functions
bounds-plausible?: Private generic functions
bounds-plausible?: Private generic functions
bounds-start1: Private ordinary functions
bounds-start2: Private ordinary functions
bounds-trivial?: Private ordinary functions
box: Public ordinary functions
boxp: Private ordinary functions
branch-type: Private ordinary functions
bucket-append: Private ordinary functions
bucket-push: Private ordinary functions
bucket-seq: Private ordinary functions
build-bind/ftype: Private ordinary functions

C
call-with-array-data/copy: Private ordinary functions
call-with-array-data/fast: Private ordinary functions
call/standard-input-syntax: Private ordinary functions
call/string: Private ordinary functions
callf: Public macros
callf2: Public macros
canonicalize-binding: Private ordinary functions
canonicalize-bindings: Private ordinary functions
canonicalize-key: Private ordinary functions
canonicalize-test: Private ordinary functions
capped-fork: Public compiler macros
capped-fork: Public ordinary functions
capped-fork2: Public compiler macros
capped-fork2: Public ordinary functions
car+cdr: Public ordinary functions
car-safe: Public ordinary functions
case-failure: Public ordinary functions
case-let: Public macros
case-of: Public macros
case-using: Public macros
case-using-aux: Private macros
ccase-of: Public macros
cdr-safe: Public ordinary functions
char-case: Public macros
char-case-1: Private macros
char-ecase: Public macros
char-ecase-1: Private macros
check-beginning: Private generic functions
check-beginning: Private generic functions
check-exhaustiveness: Private ordinary functions
check-match-exhaustive: Private ordinary functions
check-no-dynamic-extent: Private ordinary functions
check-no-underscores: Private ordinary functions
check-range: Private ordinary functions
check-range/inline: Private macros
check-same-test: Private ordinary functions
chomp: Public ordinary functions
class-name-of: Public ordinary functions
class-name-safe: Public ordinary functions
clause-leading-type: Private ordinary functions
clauses+default: Private ordinary functions
clear-queue: Public ordinary functions
collapse-duplicates: Public ordinary functions
collapse-whitespace: Public ordinary functions
collect-fallthrough-clauses: Private ordinary functions
collecting: Public macros
collecting*: Private macros
combination: Public generic functions
combination: Public generic functions
combine-composed-hook: Public generic functions
combine-composed-hook: Public generic functions
combine-hook-until-failure: Public generic functions
combine-hook-until-failure: Public generic functions
combine-hook-until-success: Public generic functions
combine-hook-until-success: Public generic functions
comment: Public macros
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
compare-elements: Private generic functions
Compiler Macro, (setf @): Public compiler macros
Compiler Macro, (setf href): Public compiler macros
Compiler Macro, @: Public compiler macros
Compiler Macro, capped-fork: Public compiler macros
Compiler Macro, capped-fork2: Public compiler macros
Compiler Macro, count-range: Private compiler macros
Compiler Macro, dict: Public compiler macros
Compiler Macro, do-nothing: Public compiler macros
Compiler Macro, eq*: Public compiler macros
Compiler Macro, eql*: Public compiler macros
Compiler Macro, eqls: Public compiler macros
Compiler Macro, eqs: Public compiler macros
Compiler Macro, equal*: Public compiler macros
Compiler Macro, equalp*: Public compiler macros
Compiler Macro, equals: Public compiler macros
Compiler Macro, escape: Public compiler macros
Compiler Macro, filter: Public compiler macros
Compiler Macro, filter-map: Public compiler macros
Compiler Macro, flip: Public compiler macros
Compiler Macro, fmt: Public compiler macros
Compiler Macro, fnil: Public compiler macros
Compiler Macro, fork: Public compiler macros
Compiler Macro, fork2: Public compiler macros
Compiler Macro, hook: Public compiler macros
Compiler Macro, hook2: Public compiler macros
Compiler Macro, href: Public compiler macros
Compiler Macro, in: Public compiler macros
Compiler Macro, interval: Public compiler macros
Compiler Macro, juxt: Public compiler macros
Compiler Macro, keep: Public compiler macros
Compiler Macro, make: Public compiler macros
Compiler Macro, mapply: Public compiler macros
Compiler Macro, memq: Public compiler macros
Compiler Macro, mvconstantly: Public compiler macros
Compiler Macro, mvfold: Public compiler macros
Compiler Macro, mvfoldr: Public compiler macros
Compiler Macro, no: Public compiler macros
Compiler Macro, nth-arg: Public compiler macros
Compiler Macro, nub: Public compiler macros
Compiler Macro, octet-vector: Public compiler macros
Compiler Macro, of-length: Public compiler macros
Compiler Macro, once: Public compiler macros
Compiler Macro, pad-end: Public compiler macros
Compiler Macro, pad-start: Public compiler macros
Compiler Macro, parse-float: Public compiler macros
Compiler Macro, partial: Public compiler macros
Compiler Macro, queue: Public compiler macros
Compiler Macro, random-in-range: Public compiler macros
Compiler Macro, range: Public compiler macros
Compiler Macro, repeat-sequence: Public compiler macros
Compiler Macro, require-type: Private compiler macros
Compiler Macro, require-type-for: Private compiler macros
Compiler Macro, seq=: Public compiler macros
Compiler Macro, string$=: Public compiler macros
Compiler Macro, string*=: Public compiler macros
Compiler Macro, string+: Public compiler macros
Compiler Macro, string-contains-p: Public compiler macros
Compiler Macro, string-prefix-p: Public compiler macros
Compiler Macro, string-suffix-p: Public compiler macros
Compiler Macro, string^=: Public compiler macros
Compiler Macro, test-load-time-value: Private compiler macros
Compiler Macro, true: Public compiler macros
Compiler Macro, unary->variadic: Public compiler macros
Compiler Macro, variadic->unary: Public compiler macros
Compiler Macro, vect: Public compiler macros
concat: Public ordinary functions
cond-every: Public macros
cond-let: Public macros
conditional-error: Private ordinary functions
constructor-values/generic: Private generic functions
constructor-values/generic: Private generic functions
constructor-values/generic: Private generic functions
constructor-values/generic: Private generic functions
constructor=: Private ordinary functions
copy-agroup: Private ordinary functions
copy-bounds: Private ordinary functions
copy-box: Private ordinary functions
copy-firstn: Public ordinary functions
copy-hash-table/empty: Private ordinary functions
copy-heap: Private ordinary functions
copy-queue: Public ordinary functions
copy-string: Private ordinary functions
copy-subenv: Private ordinary functions
count-cpus: Public ordinary functions
count-cpus-string: Private ordinary functions
count-range: Private compiler macros
count-range: Private ordinary functions
count-range/1: Private ordinary functions
count-range/2: Private ordinary functions
count-range/3: Private ordinary functions
ctypecase-of: Public macros

D
date-leap-year-p: Public ordinary functions
declaim-constant-function: Private macros
declaim-freeze-type: Private macros
declaim-freeze-type-1: Private macros
declaim-maybe-inline: Private macros
declaim-maybe-inline-1: Private macros
declared-ftype: Private ordinary functions
deconstruct: Public ordinary functions
def: Public macros
def: Public macros
defalias: Public macros
defalias: Public macros
default-combine-hook: Public generic functions
default-combine-hook: Public generic functions
default-tie-breaker: Private ordinary functions
defclass: Public macros
defcondition: Public macros
defconst: Public macros
defconst: Public macros
defconstant: Public macros
defconstructor: Public macros
defgeneric: Public macros
define-case-macro: Public macros
define-do-macro: Public macros
define-env-method: Private macros
define-hook: Public ordinary functions
define-hook-type: Public macros
define-post-modify-macro: Public macros
define-real-range: Private macros
define-simple-exporter: Private macros
define-symbol-macro: Public macros
define-train: Public macros
define-values: Public macros
define-values: Public macros
define-variadic-equality: Private macros
defloop: Public macros
defmacro: Public macros
defmethod: Public macros
defmethods: Public macros
defparameter: Public macros
defplace: Public macros
defstruct-read-only: Public macros
defsubst: Public macros
deftype: Public macros
defun: Public macros
defunion: Public macros
defunit: Public macros
defvar: Public macros
defvar-unbound: Public macros
delete*: Private ordinary functions
delete-from-hash-table: Public ordinary functions
delq: Public ordinary functions
deltas: Public ordinary functions
deq: Public ordinary functions
describe-non-exhaustive-match: Private ordinary functions
description: Public generic functions
description: Public generic functions
destructuring-case-of: Public macros
destructuring-ccase-of: Public macros
destructuring-ecase-of: Public macros
dict: Public compiler macros
dict: Public ordinary functions
dict*: Public ordinary functions
dictq: Public macros
digit-length: Private ordinary functions
disable-hook: Public generic functions
disable-hook: Public generic functions
disabled-handlers: Public generic functions
disabled-handlers: Public generic functions
dispatch-case: Public macros
dispatch-case-error: Public macros
dispatch-case-error-matched-types: Private generic functions
dispatch-case-error-matched-types: Private generic functions
dispatch-case-let: Public macros
dispatch-case/nobindings: Private macros
dispatch-caseql: Public macros
dispatch-caseql-let: Public macros
displace: Private ordinary functions
distinct: Public ordinary functions
do-each: Public macros
do-each/map: Private macros
do-hash-table: Public macros
do-nothing: Public compiler macros
do-nothing: Public ordinary functions
do-splits: Public macros
do-strings: Private macros
do-subseq: Private macros
do-vector: Private macros
double-float-range: Private ordinary functions
drop: Public ordinary functions
drop-prefix: Public ordinary functions
drop-suffix: Public ordinary functions
drop-until: Public ordinary functions
drop-while: Public ordinary functions
dsu-sort: Public ordinary functions
dsu-sort-new: Public ordinary functions
dynamic-closure: Public ordinary functions

E
each: Public ordinary functions
each-left: Public ordinary functions
each-right: Public ordinary functions
ecase-let: Public macros
ecase-of: Public macros
ecase-using: Public macros
econd: Public macros
econd-let: Public macros
efface: Public ordinary functions
eif: Public macros
eif-let: Public macros
eject-macro: Private generic functions
eject-macro: Private generic functions
ellipsize: Public ordinary functions
enable-hook: Public generic functions
enable-hook: Public generic functions
enq: Public ordinary functions
ensure: Public macros
ensure-monitor: Private ordinary functions
ensure-prefix: Public ordinary functions
ensure-shape: Private ordinary functions
ensure-suffix: Public ordinary functions
ensure-var: Private ordinary functions
ensure-var-alias: Private generic functions
ensure-var-alias: Private generic functions
ensure-vector: Public ordinary functions
ensure2: Public macros
ensuring-functions: Private macros
env-super: Private ordinary functions
eq*: Public compiler macros
eq*: Public ordinary functions
eql*: Public compiler macros
eql*: Public ordinary functions
eqls: Public compiler macros
eqls: Public ordinary functions
eqs: Public compiler macros
eqs: Public ordinary functions
equal*: Public compiler macros
equal*: Public ordinary functions
equalp*: Public compiler macros
equalp*: Public ordinary functions
equals: Public compiler macros
equals: Public ordinary functions
equals: Private generic functions
equals: Private generic functions
escape: Public compiler macros
escape: Public ordinary functions
escape/no-arg-parsing: Private ordinary functions
etypecase-of: Public macros
etypecase-of/no-shadows: Private macros
eval-always: Public macros
eval-and-compile: Public macros
eval-if-constant: Public ordinary functions
example: Public macros
exe: Public ordinary functions
expand-binding: Private ordinary functions
expand-bindings: Private ordinary functions
expand-body: Private generic functions
expand-body: Private generic functions
expand-case-macro: Private ordinary functions
expand-case-macro/common: Private ordinary functions
expand-case-macro/flet: Private ordinary functions
expand-case-macro/tagbody: Private ordinary functions
expand-char-case-keys: Private ordinary functions
expand-destructuring-case-of: Private ordinary functions
expand-dispatch-caseql-clauses: Private ordinary functions
expand-fbindings: Private ordinary functions
expand-href: Private ordinary functions
expand-in-env: Private generic functions
expand-in-env: Private generic functions
expand-in-env-1: Private generic functions
expand-in-env-1: Private generic functions
expand-macro: Public ordinary functions
expand-macro-recursively: Public ordinary functions
expand-mvfold: Private ordinary functions
expand-nest: Private ordinary functions
expand-pad-x: Private ordinary functions
expand-partially: Private generic functions
expand-partially: Private generic functions
expand-read-only-var: Private ordinary functions
expand-top: Private generic functions
expand-top: Private generic functions
expand-variadic-equality: Private ordinary functions
expansion-done: Private generic functions
expansion-done: Private generic functions
expect-form-list: Public ordinary functions
expect-single-form: Public ordinary functions
explode-type: Private ordinary functions
exponent-char-format: Private ordinary functions
exponent-char?: Private ordinary functions
export-always: Public macros
export-only: Public ordinary functions
export-only-always: Public macros
extract-function-name: Private ordinary functions
extract-op-env: Private ordinary functions
extract-tagbody-tags: Private ordinary functions
extrema: Public ordinary functions

F
fbind: Public macros
fbind*: Public macros
fbindrec: Public macros
fbindrec*: Public macros
fdec: Public macros
file-size: Public ordinary functions
file-size-human-readable: Public ordinary functions
file=: Public ordinary functions
file=/loop: Private ordinary functions
fill-int-range!: Private ordinary functions
filter: Public compiler macros
filter: Public ordinary functions
filter-map: Public compiler macros
filter-map: Public ordinary functions
filter/counted: Private ordinary functions
filter/swapped-arguments: Private ordinary functions
filterf: Public macros
finc: Public macros
find-class-safe: Public ordinary functions
find-external-symbol: Public ordinary functions
find-handler: Public ordinary functions
find-hook: Public ordinary functions
find-keyword: Public ordinary functions
firstn: Public ordinary functions
firstn-values: Private macros
fixnump: Public ordinary functions
flet*: Private macros
flip: Public compiler macros
flip: Public ordinary functions
flip-hash-table: Public ordinary functions
float-precision-contagion: Public ordinary functions
flush-all-static-binding-groups: Public ordinary functions
flush-static-binding-group: Public ordinary functions
fmt: Public compiler macros
fmt: Public ordinary functions
fn: Public generic functions
fn: Public generic functions
fnil: Public compiler macros
fnil: Public ordinary functions
fork: Public compiler macros
fork: Public ordinary functions
fork2: Public compiler macros
fork2: Public ordinary functions
format-file-size-human-readable: Public ordinary functions
format-human-size: Public ordinary functions
frange: Private ordinary functions
free?: Private ordinary functions
frequencies: Public ordinary functions
front: Public ordinary functions
fuel: Public ordinary functions
fun: Private ordinary functions
Function, $path: Private ordinary functions
Function, %flatten: Private ordinary functions
Function, %flush: Private ordinary functions
Function, %make-static-binding: Private ordinary functions
Function, %require-type: Private ordinary functions
Function, %require-type-for: Private ordinary functions
Function, (setf %read-only-var): Private ordinary functions
Function, (setf @): Public ordinary functions
Function, (setf bound-value): Public ordinary functions
Function, (setf front): Public ordinary functions
Function, (setf heap-key): Private ordinary functions
Function, (setf heap-test): Private ordinary functions
Function, (setf href): Public ordinary functions
Function, (setf initializedp): Private ordinary functions
Function, (setf name): Private ordinary functions
Function, (setf nsubseq): Public ordinary functions
Function, (setf qback): Public ordinary functions
Function, (setf read-only): Private ordinary functions
Function, (setf unbox): Public ordinary functions
Function, (setf value): Private ordinary functions
Function, (setf value-ref): Private ordinary functions
Function, @: Public ordinary functions
Function, add-hook-internal: Private ordinary functions
Function, agroup: Private ordinary functions
Function, agroup-bucket: Private ordinary functions
Function, agroup-exemplar: Private ordinary functions
Function, analyze-fbinds: Private ordinary functions
Function, append1: Public ordinary functions
Function, array-index-row-major: Public ordinary functions
Function, array=: Public ordinary functions
Function, ascii-char-p: Public ordinary functions
Function, assocadr: Public ordinary functions
Function, assocar: Public ordinary functions
Function, assocdr: Public ordinary functions
Function, assort: Public ordinary functions
Function, augment/block: Private ordinary functions
Function, augment/funs: Private ordinary functions
Function, augment/macros: Private ordinary functions
Function, augment/symbol-macros: Private ordinary functions
Function, augment/tags: Private ordinary functions
Function, augment/vars: Private ordinary functions
Function, base-path-join: Public ordinary functions
Function, batches: Public ordinary functions
Function, bestn: Public ordinary functions
Function, bisect-left: Public ordinary functions
Function, bisect-right: Public ordinary functions
Function, bits: Public ordinary functions
Function, blankp: Public ordinary functions
Function, body+vars: Private ordinary functions
Function, body-decls: Private ordinary functions
Function, bound-value: Public ordinary functions
Function, bounds: Private ordinary functions
Function, bounds-end1: Private ordinary functions
Function, bounds-end2: Private ordinary functions
Function, bounds-start1: Private ordinary functions
Function, bounds-start2: Private ordinary functions
Function, bounds-trivial?: Private ordinary functions
Function, box: Public ordinary functions
Function, boxp: Private ordinary functions
Function, branch-type: Private ordinary functions
Function, bucket-append: Private ordinary functions
Function, bucket-push: Private ordinary functions
Function, bucket-seq: Private ordinary functions
Function, build-bind/ftype: Private ordinary functions
Function, call-with-array-data/copy: Private ordinary functions
Function, call-with-array-data/fast: Private ordinary functions
Function, call/standard-input-syntax: Private ordinary functions
Function, call/string: Private ordinary functions
Function, canonicalize-binding: Private ordinary functions
Function, canonicalize-bindings: Private ordinary functions
Function, canonicalize-key: Private ordinary functions
Function, canonicalize-test: Private ordinary functions
Function, capped-fork: Public ordinary functions
Function, capped-fork2: Public ordinary functions
Function, car+cdr: Public ordinary functions
Function, car-safe: Public ordinary functions
Function, case-failure: Public ordinary functions
Function, cdr-safe: Public ordinary functions
Function, check-exhaustiveness: Private ordinary functions
Function, check-match-exhaustive: Private ordinary functions
Function, check-no-dynamic-extent: Private ordinary functions
Function, check-no-underscores: Private ordinary functions
Function, check-range: Private ordinary functions
Function, check-same-test: Private ordinary functions
Function, chomp: Public ordinary functions
Function, class-name-of: Public ordinary functions
Function, class-name-safe: Public ordinary functions
Function, clause-leading-type: Private ordinary functions
Function, clauses+default: Private ordinary functions
Function, clear-queue: Public ordinary functions
Function, collapse-duplicates: Public ordinary functions
Function, collapse-whitespace: Public ordinary functions
Function, collect-fallthrough-clauses: Private ordinary functions
Function, concat: Public ordinary functions
Function, conditional-error: Private ordinary functions
Function, constructor=: Private ordinary functions
Function, copy-agroup: Private ordinary functions
Function, copy-bounds: Private ordinary functions
Function, copy-box: Private ordinary functions
Function, copy-firstn: Public ordinary functions
Function, copy-hash-table/empty: Private ordinary functions
Function, copy-heap: Private ordinary functions
Function, copy-queue: Public ordinary functions
Function, copy-string: Private ordinary functions
Function, copy-subenv: Private ordinary functions
Function, count-cpus: Public ordinary functions
Function, count-cpus-string: Private ordinary functions
Function, count-range: Private ordinary functions
Function, count-range/1: Private ordinary functions
Function, count-range/2: Private ordinary functions
Function, count-range/3: Private ordinary functions
Function, date-leap-year-p: Public ordinary functions
Function, declared-ftype: Private ordinary functions
Function, deconstruct: Public ordinary functions
Function, default-tie-breaker: Private ordinary functions
Function, define-hook: Public ordinary functions
Function, delete*: Private ordinary functions
Function, delete-from-hash-table: Public ordinary functions
Function, delq: Public ordinary functions
Function, deltas: Public ordinary functions
Function, deq: Public ordinary functions
Function, describe-non-exhaustive-match: Private ordinary functions
Function, dict: Public ordinary functions
Function, dict*: Public ordinary functions
Function, digit-length: Private ordinary functions
Function, displace: Private ordinary functions
Function, distinct: Public ordinary functions
Function, do-nothing: Public ordinary functions
Function, double-float-range: Private ordinary functions
Function, drop: Public ordinary functions
Function, drop-prefix: Public ordinary functions
Function, drop-suffix: Public ordinary functions
Function, drop-until: Public ordinary functions
Function, drop-while: Public ordinary functions
Function, dsu-sort: Public ordinary functions
Function, dsu-sort-new: Public ordinary functions
Function, dynamic-closure: Public ordinary functions
Function, each: Public ordinary functions
Function, each-left: Public ordinary functions
Function, each-right: Public ordinary functions
Function, efface: Public ordinary functions
Function, ellipsize: Public ordinary functions
Function, enq: Public ordinary functions
Function, ensure-monitor: Private ordinary functions
Function, ensure-prefix: Public ordinary functions
Function, ensure-shape: Private ordinary functions
Function, ensure-suffix: Public ordinary functions
Function, ensure-var: Private ordinary functions
Function, ensure-vector: Public ordinary functions
Function, env-super: Private ordinary functions
Function, eq*: Public ordinary functions
Function, eql*: Public ordinary functions
Function, eqls: Public ordinary functions
Function, eqs: Public ordinary functions
Function, equal*: Public ordinary functions
Function, equalp*: Public ordinary functions
Function, equals: Public ordinary functions
Function, escape: Public ordinary functions
Function, escape/no-arg-parsing: Private ordinary functions
Function, eval-if-constant: Public ordinary functions
Function, exe: Public ordinary functions
Function, expand-binding: Private ordinary functions
Function, expand-bindings: Private ordinary functions
Function, expand-case-macro: Private ordinary functions
Function, expand-case-macro/common: Private ordinary functions
Function, expand-case-macro/flet: Private ordinary functions
Function, expand-case-macro/tagbody: Private ordinary functions
Function, expand-char-case-keys: Private ordinary functions
Function, expand-destructuring-case-of: Private ordinary functions
Function, expand-dispatch-caseql-clauses: Private ordinary functions
Function, expand-fbindings: Private ordinary functions
Function, expand-href: Private ordinary functions
Function, expand-macro: Public ordinary functions
Function, expand-macro-recursively: Public ordinary functions
Function, expand-mvfold: Private ordinary functions
Function, expand-nest: Private ordinary functions
Function, expand-pad-x: Private ordinary functions
Function, expand-read-only-var: Private ordinary functions
Function, expand-variadic-equality: Private ordinary functions
Function, expect-form-list: Public ordinary functions
Function, expect-single-form: Public ordinary functions
Function, explode-type: Private ordinary functions
Function, exponent-char-format: Private ordinary functions
Function, exponent-char?: Private ordinary functions
Function, export-only: Public ordinary functions
Function, extract-function-name: Private ordinary functions
Function, extract-op-env: Private ordinary functions
Function, extract-tagbody-tags: Private ordinary functions
Function, extrema: Public ordinary functions
Function, file-size: Public ordinary functions
Function, file-size-human-readable: Public ordinary functions
Function, file=: Public ordinary functions
Function, file=/loop: Private ordinary functions
Function, fill-int-range!: Private ordinary functions
Function, filter: Public ordinary functions
Function, filter-map: Public ordinary functions
Function, filter/counted: Private ordinary functions
Function, filter/swapped-arguments: Private ordinary functions
Function, find-class-safe: Public ordinary functions
Function, find-external-symbol: Public ordinary functions
Function, find-handler: Public ordinary functions
Function, find-hook: Public ordinary functions
Function, find-keyword: Public ordinary functions
Function, firstn: Public ordinary functions
Function, fixnump: Public ordinary functions
Function, flip: Public ordinary functions
Function, flip-hash-table: Public ordinary functions
Function, float-precision-contagion: Public ordinary functions
Function, flush-all-static-binding-groups: Public ordinary functions
Function, flush-static-binding-group: Public ordinary functions
Function, fmt: Public ordinary functions
Function, fnil: Public ordinary functions
Function, fork: Public ordinary functions
Function, fork2: Public ordinary functions
Function, format-file-size-human-readable: Public ordinary functions
Function, format-human-size: Public ordinary functions
Function, frange: Private ordinary functions
Function, free?: Private ordinary functions
Function, frequencies: Public ordinary functions
Function, front: Public ordinary functions
Function, fuel: Public ordinary functions
Function, fun: Private ordinary functions
Function, gcp: Public ordinary functions
Function, gcs: Public ordinary functions
Function, gensym?: Private ordinary functions
Function, get-unix-time: Public ordinary functions
Function, grow: Public ordinary functions
Function, halves: Public ordinary functions
Function, hash-fold: Public ordinary functions
Function, hash-table-function: Public ordinary functions
Function, hash-table-predicate: Public ordinary functions
Function, hash-table-set: Public ordinary functions
Function, hash-table-test-p: Public ordinary functions
Function, heap-extract: Public ordinary functions
Function, heap-extract-all: Public ordinary functions
Function, heap-extract-maximum: Public ordinary functions
Function, heap-insert: Public ordinary functions
Function, heap-key: Private ordinary functions
Function, heap-left: Private ordinary functions
Function, heap-maximum: Public ordinary functions
Function, heap-p: Private ordinary functions
Function, heap-parent: Private ordinary functions
Function, heap-right: Private ordinary functions
Function, heap-test: Private ordinary functions
Function, heap-vector: Private ordinary functions
Function, heapify: Private ordinary functions
Function, hoist-clause-bodies: Private ordinary functions
Function, hook: Public ordinary functions
Function, hook2: Public ordinary functions
Function, href: Public ordinary functions
Function, href-default: Public ordinary functions
Function, human-size-formatter: Public ordinary functions
Function, ignored-functions-in-body: Private ordinary functions
Function, ignored-functions-in-decls: Private ordinary functions
Function, in: Public ordinary functions
Function, include+opts: Private ordinary functions
Function, initialize-binds-from-decls: Private ordinary functions
Function, initializedp: Private ordinary functions
Function, insert-superclass: Private ordinary functions
Function, int-range-shape: Private ordinary functions
Function, integer-range: Private ordinary functions
Function, intern-unit: Private ordinary functions
Function, intersectionp: Public ordinary functions
Function, intersperse: Public ordinary functions
Function, intersperse/list: Private ordinary functions
Function, intersperse/seq: Private ordinary functions
Function, interval: Public ordinary functions
Function, invalid: Private ordinary functions
Function, juxt: Public ordinary functions
Function, keep: Public ordinary functions
Function, key-test: Private ordinary functions
Function, lambda-list-vars: Private ordinary functions
Function, leaf-map: Public ordinary functions
Function, leaf-walk: Public ordinary functions
Function, length<: Public ordinary functions
Function, length<=: Public ordinary functions
Function, length>: Public ordinary functions
Function, length>=: Public ordinary functions
Function, let-over-lambda: Private ordinary functions
Function, lines: Public ordinary functions
Function, link: Private ordinary functions
Function, list+length: Private ordinary functions
Function, list-collapse-duplicates: Private ordinary functions
Function, list-map-from-end/bordeaux: Private ordinary functions
Function, list-runs: Private ordinary functions
Function, lock: Private ordinary functions
Function, lock-form: Private ordinary functions
Function, long-float-range: Private ordinary functions
Function, longer: Public ordinary functions
Function, longest: Public ordinary functions
Function, longest-list: Private ordinary functions
Function, longest-seq: Private ordinary functions
Function, macro: Private ordinary functions
Function, make: Public ordinary functions
Function, make-active-groups-binding: Private ordinary functions
Function, make-bucket: Private ordinary functions
Function, make-float: Private ordinary functions
Function, make-flusher: Private ordinary functions
Function, make-handler: Private ordinary functions
Function, make-handler-any: Public ordinary functions
Function, make-handler-number->number: Public ordinary functions
Function, make-handler-string->string: Public ordinary functions
Function, make-handler-void: Public ordinary functions
Function, make-hash-table-function: Public ordinary functions
Function, make-heap: Public ordinary functions
Function, make-hook-any: Public ordinary functions
Function, make-hook-number->number: Public ordinary functions
Function, make-hook-string->string: Public ordinary functions
Function, make-hook-void: Public ordinary functions
Function, make-initform: Private ordinary functions
Function, make-let-binding: Private ordinary functions
Function, make-macrolet-binding: Private ordinary functions
Function, make-octet-vector: Public ordinary functions
Function, make-op-env: Private ordinary functions
Function, make-queue: Private ordinary functions
Function, make-queue-cons: Private ordinary functions
Function, make-sequence-like: Private ordinary functions
Function, make-static-binding: Private ordinary functions
Function, make-type-declaration: Private ordinary functions
Function, make-unique-name-list: Private ordinary functions
Function, map-splits: Private ordinary functions
Function, map-splits-from-end: Private ordinary functions
Function, map-splits-from-start: Private ordinary functions
Function, map-subseq: Private ordinary functions
Function, map-tree: Public ordinary functions
Function, map-tree/inorder: Private ordinary functions
Function, map-tree/postorder: Private ordinary functions
Function, map-tree/preorder: Private ordinary functions
Function, mapcar-into: Public ordinary functions
Function, mapconcat: Public ordinary functions
Function, mapconcat/list: Private ordinary functions
Function, mapconcat/seq: Private ordinary functions
Function, maphash-into: Public ordinary functions
Function, maphash-new: Public ordinary functions
Function, maphash-return: Public ordinary functions
Function, mapply: Public ordinary functions
Function, maybe-invoke-restart: Public ordinary functions
Function, memq: Public ordinary functions
Function, merely-syntactic-functions: Private ordinary functions
Function, merge-tables: Public ordinary functions
Function, merge-tables!: Private ordinary functions
Function, missing-branch: Private ordinary functions
Function, move-hook-handlers: Private ordinary functions
Function, mutual-element-type: Private ordinary functions
Function, mvconstantly: Public ordinary functions
Function, mvfold: Public ordinary functions
Function, mvfold-aux: Private ordinary functions
Function, mvfoldr: Public ordinary functions
Function, name: Private ordinary functions
Function, nconc1: Public ordinary functions
Function, no: Public ordinary functions
Function, normalize-cases: Private ordinary functions
Function, nsplice-list: Private ordinary functions
Function, nsplice-seq: Public ordinary functions
Function, nsplice-vector: Private ordinary functions
Function, nstring-invert-case: Public ordinary functions
Function, nstring-upcase-initials: Public ordinary functions
Function, nsubseq: Public ordinary functions
Function, nth-arg: Public ordinary functions
Function, nth-best: Public ordinary functions
Function, nth-best!: Public ordinary functions
Function, nthrest: Public ordinary functions
Function, nub: Public ordinary functions
Function, null-if: Public ordinary functions
Function, null-if-empty: Public ordinary functions
Function, null-if-zero: Public ordinary functions
Function, numbered-placeholder?: Private ordinary functions
Function, occurs: Public ordinary functions
Function, occurs-if: Public ordinary functions
Function, octet-vector: Public ordinary functions
Function, octet-vector-p: Public ordinary functions
Function, octet-vector=: Public ordinary functions
Function, octet-vector=/unsafe: Private ordinary functions
Function, octets: Public ordinary functions
Function, of-length: Public ordinary functions
Function, once: Public ordinary functions
Function, only-elt: Public ordinary functions
Function, ordering: Public ordinary functions
Function, package-exports: Public ordinary functions
Function, package-name-keyword: Public ordinary functions
Function, package-names: Public ordinary functions
Function, pad-end: Public ordinary functions
Function, pad-start: Public ordinary functions
Function, pairhash: Public ordinary functions
Function, pairwise: Private ordinary functions
Function, parse-defmethod-args: Private ordinary functions
Function, parse-float: Public ordinary functions
Function, parse-leading-keywords: Public ordinary functions
Function, parse-static-let: Private ordinary functions
Function, parse-static-let*: Private ordinary functions
Function, partial: Public ordinary functions
Function, partition: Public ordinary functions
Function, partition-declarations: Public ordinary functions
Function, partition-declarations-by-kind: Private ordinary functions
Function, partition-fbinds: Private ordinary functions
Function, partitions: Public ordinary functions
Function, path-basename: Public ordinary functions
Function, path-join: Public ordinary functions
Function, pattern-type: Private ordinary functions
Function, placeholder?: Private ordinary functions
Function, plist-keys: Public ordinary functions
Function, plist-values: Public ordinary functions
Function, policy-quality: Private ordinary functions
Function, policy>: Private ordinary functions
Function, pophash: Public ordinary functions
Function, powerset: Public ordinary functions
Function, prepare-int-range: Private ordinary functions
Function, prepend: Public ordinary functions
Function, pretty-print-hash-table: Public ordinary functions
Function, print-constructor: Private ordinary functions
Function, print-unit: Private ordinary functions
Function, prod: Public ordinary functions
Function, proper-alist?: Private ordinary functions
Function, proper-list-without-nil?: Private ordinary functions
Function, proper-list?: Private ordinary functions
Function, proper-subtype-p: Public ordinary functions
Function, proper-supertype-p: Public ordinary functions
Function, prune: Public ordinary functions
Function, prune-if: Public ordinary functions
Function, qappend: Public ordinary functions
Function, qback: Public ordinary functions
Function, qconc: Public ordinary functions
Function, qlen: Public ordinary functions
Function, qlist: Public ordinary functions
Function, qpreconc: Public ordinary functions
Function, qprepend: Public ordinary functions
Function, queue: Public ordinary functions
Function, queue-cons: Private ordinary functions
Function, queue-empty-p: Public ordinary functions
Function, queuep: Public ordinary functions
Function, quickselect: Private ordinary functions
Function, quotation?: Private ordinary functions
Function, quote-unless-constant: Private ordinary functions
Function, random-in-range: Public ordinary functions
Function, random-range-type: Private ordinary functions
Function, range: Public ordinary functions
Function, range-error: Private ordinary functions
Function, rassocar: Public ordinary functions
Function, rassocdr: Public ordinary functions
Function, ravel: Public ordinary functions
Function, read-eval-prefix: Public ordinary functions
Function, read-float: Private ordinary functions
Function, read-float-aux: Private ordinary functions
Function, read-new-value: Private ordinary functions
Function, read-only: Private ordinary functions
Function, read-only-include-clause: Private ordinary functions
Function, read-only-slotdef: Private ordinary functions
Function, real-range: Private ordinary functions
Function, recklessly-continue: Public ordinary functions
Function, reduce-between: Private ordinary functions
Function, reduce-vector-pairwise: Private ordinary functions
Function, reify-bounds: Private ordinary functions
Function, remove-duplicated-subtypes: Private ordinary functions
Function, remove-shadowed: Private ordinary functions
Function, remove-shadowed-clauses: Private ordinary functions
Function, remove-shadowed-subtypes: Private ordinary functions
Function, repeat-list: Private ordinary functions
Function, repeat-sequence: Public ordinary functions
Function, repeat-vector: Private ordinary functions
Function, replace*: Private ordinary functions
Function, report-group-substring: Private ordinary functions
Function, report-static-binding-active-error: Private ordinary functions
Function, report-static-binding-flush-error: Private ordinary functions
Function, require-type: Private ordinary functions
Function, require-type-for: Private ordinary functions
Function, reshape: Public ordinary functions
Function, reshuffle: Public ordinary functions
Function, resolve-executable: Public ordinary functions
Function, rest-op?: Private ordinary functions
Function, rest-placeholder?: Private ordinary functions
Function, reuse-cons: Public ordinary functions
Function, rotation: Private ordinary functions
Function, round-to: Public ordinary functions
Function, run-hooks: Public ordinary functions
Function, runs: Public ordinary functions
Function, same: Public ordinary functions
Function, same-case-p: Public ordinary functions
Function, same-literal-p: Private ordinary functions
Function, same-test?: Private ordinary functions
Function, same-type?: Private ordinary functions
Function, scan: Public ordinary functions
Function, seq=: Public ordinary functions
Function, seq=/2: Private ordinary functions
Function, sequencep: Public ordinary functions
Function, set-hash-table: Public ordinary functions
Function, setslice: Private ordinary functions
Function, shadow-names: Private ordinary functions
Function, shape: Public ordinary functions
Function, shape=: Private ordinary functions
Function, short-float-range: Private ordinary functions
Function, shorter: Public ordinary functions
Function, shortest: Public ordinary functions
Function, shortest-list: Private ordinary functions
Function, shortest-seq: Private ordinary functions
Function, shortest/longest: Private ordinary functions
Function, shrink: Public ordinary functions
Function, shrink-wrap: Private ordinary functions
Function, si-prefix: Public ordinary functions
Function, simple-binding-p: Private ordinary functions
Function, simple-lambda-list?: Private ordinary functions
Function, simplify-args-for-string-plus: Private ordinary functions
Function, simplify-keylists: Private ordinary functions
Function, simplify-string: Private ordinary functions
Function, simplify-subtypes: Private ordinary functions
Function, single: Public ordinary functions
Function, single-float-range: Private ordinary functions
Function, slice: Public ordinary functions
Function, slice-bounds: Private ordinary functions
Function, slot-value-safe: Public ordinary functions
Function, sort-clauses: Private ordinary functions
Function, sort-new: Public ordinary functions
Function, sort-subtypes: Private ordinary functions
Function, sorting-network: Private ordinary functions
Function, speed-matters?: Private ordinary functions
Function, splice-list: Private ordinary functions
Function, splice-seq: Public ordinary functions
Function, splice-vector: Private ordinary functions
Function, split-at: Private ordinary functions
Function, stable-set-difference: Public ordinary functions
Function, stable-sort-new: Public ordinary functions
Function, static-binding-active-error: Public ordinary functions
Function, static-binding-flush-error: Public ordinary functions
Function, string$=: Public ordinary functions
Function, string*=: Public ordinary functions
Function, string+: Public ordinary functions
Function, string-case-failure: Private ordinary functions
Function, string-contains-p: Public ordinary functions
Function, string-count: Public ordinary functions
Function, string-gensym: Public ordinary functions
Function, string-invert-case: Public ordinary functions
Function, string-join: Public ordinary functions
Function, string-prefix-p: Public ordinary functions
Function, string-replace: Public ordinary functions
Function, string-replace-all: Public ordinary functions
Function, string-suffix-p: Public ordinary functions
Function, string-token-p: Public ordinary functions
Function, string-upcase-initials: Public ordinary functions
Function, string^=: Public ordinary functions
Function, string~=: Public ordinary functions
Function, subenv: Private ordinary functions
Function, subenv-blocks: Private ordinary functions
Function, subenv-empty?: Private ordinary functions
Function, subenv-funs: Private ordinary functions
Function, subenv-tags: Private ordinary functions
Function, subenv-vars: Private ordinary functions
Function, subtypes-exhaustive?: Private ordinary functions
Function, sum: Public ordinary functions
Function, supertypep: Public ordinary functions
Function, swaphash: Public ordinary functions
Function, sym-numbered-placeholder?: Private ordinary functions
Function, sym-rest-arg?: Private ordinary functions
Function, sym-underscore?: Private ordinary functions
Function, symbol-macro: Private ordinary functions
Function, symbol-macro-bindings: Private ordinary functions
Function, tagbody-tag?: Private ordinary functions
Function, take: Public ordinary functions
Function, take-until: Public ordinary functions
Function, take-while: Public ordinary functions
Function, tally: Public ordinary functions
Function, tell: Public ordinary functions
Function, test-fn: Private ordinary functions
Function, test-kind: Private ordinary functions
Function, test-load-time-value: Private ordinary functions
Function, thread-aux: Private ordinary functions
Function, throttle: Public ordinary functions
Function, time-since: Public ordinary functions
Function, time-until: Public ordinary functions
Function, toggle-pretty-print-hash-table: Public ordinary functions
Function, tokens: Public ordinary functions
Function, toposort: Public ordinary functions
Function, trampoline: Public ordinary functions
Function, trim-whitespace: Public ordinary functions
Function, true: Public ordinary functions
Function, tsort: Private ordinary functions
Function, tsort/hash-table: Private ordinary functions
Function, tsort/list: Private ordinary functions
Function, type-vref: Private ordinary functions
Function, unary->variadic: Public ordinary functions
Function, unbits: Public ordinary functions
Function, unbound: Private ordinary functions
Function, unbound-p: Private ordinary functions
Function, unbound-var: Private ordinary functions
Function, unbox: Public ordinary functions
Function, undeq: Public ordinary functions
Function, undisplace-array: Public ordinary functions
Function, unique-name: Public ordinary functions
Function, universal-to-unix: Public ordinary functions
Function, unix-to-universal: Public ordinary functions
Function, unoctets: Public ordinary functions
Function, unparse-ordinary-lambda-list: Public ordinary functions
Function, unsplice: Public ordinary functions
Function, valence: Public ordinary functions
Function, value: Private ordinary functions
Function, value-ref: Private ordinary functions
Function, values-vector: Public ordinary functions
Function, var: Private ordinary functions
Function, var-lexical?: Private ordinary functions
Function, variable-special?: Private ordinary functions
Function, variable-type: Private ordinary functions
Function, variadic->unary: Public ordinary functions
Function, vect: Public ordinary functions
Function, vector-conc-extend: Public ordinary functions
Function, vector-kind: Private ordinary functions
Function, vector=: Public ordinary functions
Function, visible-of-type: Private ordinary functions
Function, void: Private ordinary functions
Function, walk-tree: Public ordinary functions
Function, whitespacep: Public ordinary functions
Function, word-wrap: Public ordinary functions
Function, words: Public ordinary functions
Function, write-file-into-stream: Public ordinary functions
Function, write-stream-into-file: Public ordinary functions

G
gcp: Public ordinary functions
gcs: Public ordinary functions
generate-internal-definitions: Private generic functions
generate-internal-definitions: Private generic functions
generate-values-vector-case: Private macros
Generic Function, %constructor=: Private generic functions
Generic Function, (setf args-of): Private generic functions
Generic Function, (setf combination): Public generic functions
Generic Function, (setf description): Public generic functions
Generic Function, (setf disabled-handlers): Public generic functions
Generic Function, (setf fn): Public generic functions
Generic Function, (setf handler-type): Public generic functions
Generic Function, (setf handlers): Public generic functions
Generic Function, (setf name): Public generic functions
Generic Function, (setf place): Public generic functions
Generic Function, (setf value): Public generic functions
Generic Function, add-hook: Public generic functions
Generic Function, alias-decls: Private generic functions
Generic Function, args-of: Private generic functions
Generic Function, at-beginning?: Private generic functions
Generic Function, binding-init: Private generic functions
Generic Function, binding-name: Private generic functions
Generic Function, bounds-plausible?: Private generic functions
Generic Function, check-beginning: Private generic functions
Generic Function, combination: Public generic functions
Generic Function, combine-composed-hook: Public generic functions
Generic Function, combine-hook-until-failure: Public generic functions
Generic Function, combine-hook-until-success: Public generic functions
Generic Function, compare-elements: Private generic functions
Generic Function, constructor-values/generic: Private generic functions
Generic Function, default-combine-hook: Public generic functions
Generic Function, description: Public generic functions
Generic Function, disable-hook: Public generic functions
Generic Function, disabled-handlers: Public generic functions
Generic Function, dispatch-case-error-matched-types: Private generic functions
Generic Function, eject-macro: Private generic functions
Generic Function, enable-hook: Public generic functions
Generic Function, ensure-var-alias: Private generic functions
Generic Function, equals: Private generic functions
Generic Function, expand-body: Private generic functions
Generic Function, expand-in-env: Private generic functions
Generic Function, expand-in-env-1: Private generic functions
Generic Function, expand-partially: Private generic functions
Generic Function, expand-top: Private generic functions
Generic Function, expansion-done: Private generic functions
Generic Function, fn: Public generic functions
Generic Function, generate-internal-definitions: Private generic functions
Generic Function, handler-class: Private generic functions
Generic Function, handler-type: Public generic functions
Generic Function, handlers: Public generic functions
Generic Function, hoisted-var?: Private generic functions
Generic Function, in-subenv?: Private generic functions
Generic Function, inconsistent-graph-constraints: Public generic functions
Generic Function, known-var?: Private generic functions
Generic Function, monitor: Public generic functions
Generic Function, name: Public generic functions
Generic Function, op-env-lambda: Private generic functions
Generic Function, place: Public generic functions
Generic Function, read-only-struct-slot-names: Private generic functions
Generic Function, remove-hook: Public generic functions
Generic Function, run-hook: Public generic functions
Generic Function, run-hook-until-failure: Public generic functions
Generic Function, run-hook-until-success: Public generic functions
Generic Function, run-hook-with-args-until-failure: Public generic functions
Generic Function, run-hook-with-args-until-success: Public generic functions
Generic Function, save-symbol-macro: Private generic functions
Generic Function, shadow-symbol-macro: Private generic functions
Generic Function, splice-forms: Private generic functions
Generic Function, static-binding-flush-error-all-groups-p: Public generic functions
Generic Function, static-binding-flush-error-group: Public generic functions
Generic Function, step-expansion: Private generic functions
Generic Function, test.fn: Private generic functions
Generic Function, topmost-class: Private generic functions
Generic Function, unwrap: Private generic functions
Generic Function, value: Public generic functions
Generic Function, var-alias-bindings: Private generic functions
Generic Function, wrap-bindings: Private generic functions
Generic Function, wrap-expr: Private generic functions
Generic Function, wrap-fn-bindings: Private generic functions
gensym?: Private ordinary functions
get-unix-time: Public ordinary functions
grow: Public ordinary functions
growf: Public macros

H
halves: Public ordinary functions
handler-class: Private generic functions
handler-class: Private generic functions
handler-type: Public generic functions
handler-type: Public generic functions
handlers: Public generic functions
handlers: Public generic functions
hash-fold: Public ordinary functions
hash-table-function: Public ordinary functions
hash-table-predicate: Public ordinary functions
hash-table-set: Public ordinary functions
hash-table-test-p: Public ordinary functions
heap-extract: Public ordinary functions
heap-extract-all: Public ordinary functions
heap-extract-maximum: Public ordinary functions
heap-insert: Public ordinary functions
heap-key: Private ordinary functions
heap-left: Private ordinary functions
heap-maximum: Public ordinary functions
heap-p: Private ordinary functions
heap-parent: Private ordinary functions
heap-right: Private ordinary functions
heap-test: Private ordinary functions
heap-vector: Private ordinary functions
heapify: Private ordinary functions
hoist-clause-bodies: Private ordinary functions
hoisted-var?: Private generic functions
hoisted-var?: Private generic functions
hook: Public compiler macros
hook: Public ordinary functions
hook2: Public compiler macros
hook2: Public ordinary functions
href: Public compiler macros
href: Public ordinary functions
href-default: Public ordinary functions
human-size-formatter: Public ordinary functions

I
if-let1: Private macros
ignored-functions-in-body: Private ordinary functions
ignored-functions-in-decls: Private ordinary functions
ignoring: Public macros
in: Public compiler macros
in: Public ordinary functions
in-subenv?: Private generic functions
in-subenv?: Private generic functions
include+opts: Private ordinary functions
inconsistent-graph-constraints: Public generic functions
inconsistent-graph-constraints: Public generic functions
initialize-binds-from-decls: Private ordinary functions
initialize-instance: Public standalone methods
initializedp: Private ordinary functions
insert-superclass: Private ordinary functions
int-range-shape: Private ordinary functions
integer-range: Private ordinary functions
intern-unit: Private ordinary functions
intersectionp: Public ordinary functions
intersperse: Public ordinary functions
intersperse/list: Private ordinary functions
intersperse/seq: Private ordinary functions
interval: Public compiler macros
interval: Public ordinary functions
invalid: Private ordinary functions

J
juxt: Public compiler macros
juxt: Public ordinary functions

K
keep: Public compiler macros
keep: Public ordinary functions
key-test: Private ordinary functions
known-var?: Private generic functions
known-var?: Private generic functions

L
lambda-list-vars: Private ordinary functions
leaf-map: Public ordinary functions
leaf-walk: Public ordinary functions
length-gt: Private macros
length<: Public ordinary functions
length<=: Public ordinary functions
length>: Public ordinary functions
length>=: Public ordinary functions
let-initialized: Private macros
let-over-lambda: Private ordinary functions
let1: Private macros
letrec: Public macros
letrec*: Public macros
letrec-with: Private macros
lines: Public ordinary functions
link: Private ordinary functions
list+length: Private ordinary functions
list-collapse-duplicates: Private ordinary functions
list-map-from-end/bordeaux: Private ordinary functions
list-runs: Private ordinary functions
local: Public macros
local*: Public macros
lock: Private ordinary functions
lock-form: Private ordinary functions
long-float-range: Private ordinary functions
longer: Public ordinary functions
longest: Public ordinary functions
longest-list: Private ordinary functions
longest-seq: Private ordinary functions
lret: Public macros
lret*: Public macros
lret-aux: Private macros

M
macro: Private ordinary functions
Macro, %do-each: Private macros
Macro, %with-boolean: Private macros
Macro, ->: Public macros
Macro, and-let*: Public macros
Macro, assure: Public macros
Macro, assure-values: Private macros
Macro, assuref: Public macros
Macro, bcond: Public macros
Macro, block-compile: Public macros
Macro, boolean-if: Public macros
Macro, boolean-unless: Public macros
Macro, boolean-when: Public macros
Macro, callf: Public macros
Macro, callf2: Public macros
Macro, case-let: Public macros
Macro, case-of: Public macros
Macro, case-using: Public macros
Macro, case-using-aux: Private macros
Macro, ccase-of: Public macros
Macro, char-case: Public macros
Macro, char-case-1: Private macros
Macro, char-ecase: Public macros
Macro, char-ecase-1: Private macros
Macro, check-range/inline: Private macros
Macro, collecting: Public macros
Macro, collecting*: Private macros
Macro, comment: Public macros
Macro, cond-every: Public macros
Macro, cond-let: Public macros
Macro, ctypecase-of: Public macros
Macro, declaim-constant-function: Private macros
Macro, declaim-freeze-type: Private macros
Macro, declaim-freeze-type-1: Private macros
Macro, declaim-maybe-inline: Private macros
Macro, declaim-maybe-inline-1: Private macros
Macro, def: Public macros
Macro, def: Public macros
Macro, defalias: Public macros
Macro, defalias: Public macros
Macro, defclass: Public macros
Macro, defcondition: Public macros
Macro, defconst: Public macros
Macro, defconst: Public macros
Macro, defconstant: Public macros
Macro, defconstructor: Public macros
Macro, defgeneric: Public macros
Macro, define-case-macro: Public macros
Macro, define-do-macro: Public macros
Macro, define-env-method: Private macros
Macro, define-hook-type: Public macros
Macro, define-post-modify-macro: Public macros
Macro, define-real-range: Private macros
Macro, define-simple-exporter: Private macros
Macro, define-symbol-macro: Public macros
Macro, define-train: Public macros
Macro, define-values: Public macros
Macro, define-values: Public macros
Macro, define-variadic-equality: Private macros
Macro, defloop: Public macros
Macro, defmacro: Public macros
Macro, defmethod: Public macros
Macro, defmethods: Public macros
Macro, defparameter: Public macros
Macro, defplace: Public macros
Macro, defstruct-read-only: Public macros
Macro, defsubst: Public macros
Macro, deftype: Public macros
Macro, defun: Public macros
Macro, defunion: Public macros
Macro, defunit: Public macros
Macro, defvar: Public macros
Macro, defvar-unbound: Public macros
Macro, destructuring-case-of: Public macros
Macro, destructuring-ccase-of: Public macros
Macro, destructuring-ecase-of: Public macros
Macro, dictq: Public macros
Macro, dispatch-case: Public macros
Macro, dispatch-case-error: Public macros
Macro, dispatch-case-let: Public macros
Macro, dispatch-case/nobindings: Private macros
Macro, dispatch-caseql: Public macros
Macro, dispatch-caseql-let: Public macros
Macro, do-each: Public macros
Macro, do-each/map: Private macros
Macro, do-hash-table: Public macros
Macro, do-splits: Public macros
Macro, do-strings: Private macros
Macro, do-subseq: Private macros
Macro, do-vector: Private macros
Macro, ecase-let: Public macros
Macro, ecase-of: Public macros
Macro, ecase-using: Public macros
Macro, econd: Public macros
Macro, econd-let: Public macros
Macro, eif: Public macros
Macro, eif-let: Public macros
Macro, ensure: Public macros
Macro, ensure2: Public macros
Macro, ensuring-functions: Private macros
Macro, etypecase-of: Public macros
Macro, etypecase-of/no-shadows: Private macros
Macro, eval-always: Public macros
Macro, eval-and-compile: Public macros
Macro, example: Public macros
Macro, export-always: Public macros
Macro, export-only-always: Public macros
Macro, fbind: Public macros
Macro, fbind*: Public macros
Macro, fbindrec: Public macros
Macro, fbindrec*: Public macros
Macro, fdec: Public macros
Macro, filterf: Public macros
Macro, finc: Public macros
Macro, firstn-values: Private macros
Macro, flet*: Private macros
Macro, generate-values-vector-case: Private macros
Macro, growf: Public macros
Macro, if-let1: Private macros
Macro, ignoring: Public macros
Macro, length-gt: Private macros
Macro, let-initialized: Private macros
Macro, let1: Private macros
Macro, letrec: Public macros
Macro, letrec*: Public macros
Macro, letrec-with: Private macros
Macro, local: Public macros
Macro, local*: Public macros
Macro, lret: Public macros
Macro, lret*: Public macros
Macro, lret-aux: Private macros
Macro, match-of: Public macros
Macro, mvdef: Private macros
Macro, mvlet: Public macros
Macro, mvlet*: Public macros
Macro, nand: Public macros
Macro, nest: Public macros
Macro, nix: Public macros
Macro, nix-1: Private macros
Macro, nlet: Public macros
Macro, nor: Public macros
Macro, nsplice-seqf: Public macros
Macro, op: Public macros
Macro, op/no-walker: Private macros
Macro, opf: Public macros
Macro, policy-quality-in-env: Private macros
Macro, pop-assoc: Public macros
Macro, prependf: Public macros
Macro, push-end: Public macros
Macro, push-end-new: Public macros
Macro, read-only-var: Private macros
Macro, rebinding-functions: Private macros
Macro, receive: Public macros
Macro, select: Public macros
Macro, selector: Public macros
Macro, seq-dispatch: Private macros
Macro, shrinkf: Public macros
Macro, si-prefix-rec: Private macros
Macro, sort-values: Public macros
Macro, sort-values/network: Private macros
Macro, sort-values/temp-vector: Private macros
Macro, splice-seqf: Public macros
Macro, stack-flet: Private macros
Macro, static-let: Public macros
Macro, static-let*: Public macros
Macro, static-load-time-value: Public macros
Macro, string-case: Public macros
Macro, string-ecase: Public macros
Macro, summing: Public macros
Macro, synchronized: Public macros
Macro, tree-case: Public macros
Macro, tree-ecase: Public macros
Macro, truly-the: Private macros
Macro, typecase-of: Public macros
Macro, variable-type-in-env: Private macros
Macro, vector-dispatch: Private macros
Macro, vref: Public macros
Macro, with-boolean: Public macros
Macro, with-bounds: Private macros
Macro, with-canonicalized-binding-accessors: Private macros
Macro, with-collector: Public macros
Macro, with-collectors: Public macros
Macro, with-hook-restart: Public macros
Macro, with-int-vector: Private macros
Macro, with-item-key-function: Public macros
Macro, with-list-bucket: Private macros
Macro, with-matched-type: Private macros
Macro, with-member-test: Public macros
Macro, with-nullable: Private macros
Macro, with-open-files: Public macros
Macro, with-read-only-vars: Public macros
Macro, with-sequence-bucket: Private macros
Macro, with-simple-vector: Private macros
Macro, with-simple-vector-dispatch: Public macros
Macro, with-specialized-buckets: Private macros
Macro, with-standard-input-syntax: Public macros
Macro, with-string: Public macros
Macro, with-string-bucket: Private macros
Macro, with-string-dispatch: Public macros
Macro, with-subtype-dispatch: Public macros
Macro, with-syms: Private macros
Macro, with-thunk: Public macros
Macro, with-two-arg-test: Public macros
Macro, with-type-declarations-trusted: Private macros
Macro, with-type-dispatch: Public macros
Macro, with-vector-bucket: Private macros
Macro, with-vector-dispatch: Public macros
Macro, with-vref: Private macros
Macro, without-internal-definitions: Private macros
Macro, without-recursion: Public macros
Macro, wrong-type: Private macros
Macro, ~>: Public macros
Macro, ~>>: Public macros
make: Public compiler macros
make: Public ordinary functions
make-active-groups-binding: Private ordinary functions
make-bucket: Private ordinary functions
make-float: Private ordinary functions
make-flusher: Private ordinary functions
make-handler: Private ordinary functions
make-handler-any: Public ordinary functions
make-handler-number->number: Public ordinary functions
make-handler-string->string: Public ordinary functions
make-handler-void: Public ordinary functions
make-hash-table-function: Public ordinary functions
make-heap: Public ordinary functions
make-hook-any: Public ordinary functions
make-hook-number->number: Public ordinary functions
make-hook-string->string: Public ordinary functions
make-hook-void: Public ordinary functions
make-initform: Private ordinary functions
make-let-binding: Private ordinary functions
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-macrolet-binding: Private ordinary functions
make-octet-vector: Public ordinary functions
make-op-env: Private ordinary functions
make-queue: Private ordinary functions
make-queue-cons: Private ordinary functions
make-sequence-like: Private ordinary functions
make-static-binding: Private ordinary functions
make-type-declaration: Private ordinary functions
make-unique-name-list: Private ordinary functions
map-splits: Private ordinary functions
map-splits-from-end: Private ordinary functions
map-splits-from-start: Private ordinary functions
map-subseq: Private ordinary functions
map-tree: Public ordinary functions
map-tree/inorder: Private ordinary functions
map-tree/postorder: Private ordinary functions
map-tree/preorder: Private ordinary functions
mapcar-into: Public ordinary functions
mapconcat: Public ordinary functions
mapconcat/list: Private ordinary functions
mapconcat/seq: Private ordinary functions
maphash-into: Public ordinary functions
maphash-new: Public ordinary functions
maphash-return: Public ordinary functions
mapply: Public compiler macros
mapply: Public ordinary functions
match-of: Public macros
maybe-invoke-restart: Public ordinary functions
memq: Public compiler macros
memq: Public ordinary functions
merely-syntactic-functions: Private ordinary functions
merge-tables: Public ordinary functions
merge-tables!: Private ordinary functions
Method Combination, standard/context: Public method combinations
Method, %constructor=: Private generic functions
Method, %constructor=: Private generic functions
Method, %constructor=: Private generic functions
Method, %constructor=: Private generic functions
Method, (setf args-of): Private generic functions
Method, (setf combination): Public generic functions
Method, (setf description): Public generic functions
Method, (setf disabled-handlers): Public generic functions
Method, (setf fn): Public generic functions
Method, (setf handler-type): Public generic functions
Method, (setf handlers): Public generic functions
Method, (setf name): Public generic functions
Method, (setf place): Public generic functions
Method, (setf value): Public generic functions
Method, add-hook: Public generic functions
Method, add-hook: Public generic functions
Method, add-hook: Public generic functions
Method, add-hook: Public generic functions
Method, add-hook: Public generic functions
Method, alias-decls: Private generic functions
Method, args-of: Private generic functions
Method, at-beginning?: Private generic functions
Method, binding-init: Private generic functions
Method, binding-name: Private generic functions
Method, bounds-plausible?: Private generic functions
Method, bounds-plausible?: Private generic functions
Method, check-beginning: Private generic functions
Method, combination: Public generic functions
Method, combine-composed-hook: Public generic functions
Method, combine-hook-until-failure: Public generic functions
Method, combine-hook-until-success: Public generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, compare-elements: Private generic functions
Method, constructor-values/generic: Private generic functions
Method, constructor-values/generic: Private generic functions
Method, constructor-values/generic: Private generic functions
Method, default-combine-hook: Public generic functions
Method, description: Public generic functions
Method, disable-hook: Public generic functions
Method, disabled-handlers: Public generic functions
Method, dispatch-case-error-matched-types: Private generic functions
Method, eject-macro: Private generic functions
Method, enable-hook: Public generic functions
Method, ensure-var-alias: Private generic functions
Method, equals: Private generic functions
Method, expand-body: Private generic functions
Method, expand-in-env: Private generic functions
Method, expand-in-env-1: Private generic functions
Method, expand-partially: Private generic functions
Method, expand-top: Private generic functions
Method, expansion-done: Private generic functions
Method, fn: Public generic functions
Method, generate-internal-definitions: Private generic functions
Method, handler-class: Private generic functions
Method, handler-type: Public generic functions
Method, handlers: Public generic functions
Method, hoisted-var?: Private generic functions
Method, in-subenv?: Private generic functions
Method, inconsistent-graph-constraints: Public generic functions
Method, initialize-instance: Public standalone methods
Method, known-var?: Private generic functions
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, monitor: Public generic functions
Method, monitor: Public generic functions
Method, monitor: Public generic functions
Method, name: Public generic functions
Method, op-env-lambda: Private generic functions
Method, place: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, read-only-struct-slot-names: Private generic functions
Method, read-only-struct-slot-names: Private generic functions
Method, read-only-struct-slot-names: Private generic functions
Method, read-only-struct-slot-names: Private generic functions
Method, read-only-struct-slot-names: Private generic functions
Method, reinitialize-instance: Public standalone methods
Method, remove-hook: Public generic functions
Method, remove-hook: Public generic functions
Method, run-hook: Public generic functions
Method, run-hook: Public generic functions
Method, run-hook-until-failure: Public generic functions
Method, run-hook-until-success: Public generic functions
Method, run-hook-with-args-until-failure: Public generic functions
Method, run-hook-with-args-until-success: Public generic functions
Method, save-symbol-macro: Private generic functions
Method, shadow-symbol-macro: Private generic functions
Method, splice-forms: Private generic functions
Method, static-binding-flush-error-all-groups-p: Public generic functions
Method, static-binding-flush-error-group: Public generic functions
Method, step-expansion: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, test.fn: Private generic functions
Method, topmost-class: Private generic functions
Method, unwrap: Private generic functions
Method, validate-superclass: Public standalone methods
Method, value: Public generic functions
Method, var-alias-bindings: Private generic functions
Method, wrap-bindings: Private generic functions
Method, wrap-expr: Private generic functions
Method, wrap-fn-bindings: Private generic functions
missing-branch: Private ordinary functions
monitor: Public generic functions
monitor: Public generic functions
monitor: Public generic functions
monitor: Public generic functions
move-hook-handlers: Private ordinary functions
mutual-element-type: Private ordinary functions
mvconstantly: Public compiler macros
mvconstantly: Public ordinary functions
mvdef: Private macros
mvfold: Public compiler macros
mvfold: Public ordinary functions
mvfold-aux: Private ordinary functions
mvfoldr: Public compiler macros
mvfoldr: Public ordinary functions
mvlet: Public macros
mvlet*: Public macros

N
name: Public generic functions
name: Public generic functions
name: Private ordinary functions
nand: Public macros
nconc1: Public ordinary functions
nest: Public macros
nix: Public macros
nix-1: Private macros
nlet: Public macros
no: Public compiler macros
no: Public ordinary functions
nor: Public macros
normalize-cases: Private ordinary functions
nsplice-list: Private ordinary functions
nsplice-seq: Public ordinary functions
nsplice-seqf: Public macros
nsplice-vector: Private ordinary functions
nstring-invert-case: Public ordinary functions
nstring-upcase-initials: Public ordinary functions
nsubseq: Public ordinary functions
nth-arg: Public compiler macros
nth-arg: Public ordinary functions
nth-best: Public ordinary functions
nth-best!: Public ordinary functions
nthrest: Public ordinary functions
nub: Public compiler macros
nub: Public ordinary functions
null-if: Public ordinary functions
null-if-empty: Public ordinary functions
null-if-zero: Public ordinary functions
numbered-placeholder?: Private ordinary functions

O
occurs: Public ordinary functions
occurs-if: Public ordinary functions
octet-vector: Public compiler macros
octet-vector: Public ordinary functions
octet-vector-p: Public ordinary functions
octet-vector=: Public ordinary functions
octet-vector=/unsafe: Private ordinary functions
octets: Public ordinary functions
of-length: Public compiler macros
of-length: Public ordinary functions
once: Public compiler macros
once: Public ordinary functions
only-elt: Public ordinary functions
op: Public macros
op-env-lambda: Private generic functions
op-env-lambda: Private generic functions
op/no-walker: Private macros
opf: Public macros
ordering: Public ordinary functions

P
package-exports: Public ordinary functions
package-name-keyword: Public ordinary functions
package-names: Public ordinary functions
pad-end: Public compiler macros
pad-end: Public ordinary functions
pad-start: Public compiler macros
pad-start: Public ordinary functions
pairhash: Public ordinary functions
pairwise: Private ordinary functions
parse-defmethod-args: Private ordinary functions
parse-float: Public compiler macros
parse-float: Public ordinary functions
parse-leading-keywords: Public ordinary functions
parse-static-let: Private ordinary functions
parse-static-let*: Private ordinary functions
partial: Public compiler macros
partial: Public ordinary functions
partition: Public ordinary functions
partition-declarations: Public ordinary functions
partition-declarations-by-kind: Private ordinary functions
partition-fbinds: Private ordinary functions
partitions: Public ordinary functions
path-basename: Public ordinary functions
path-join: Public ordinary functions
pattern-type: Private ordinary functions
place: Public generic functions
place: Public generic functions
placeholder?: Private ordinary functions
plist-keys: Public ordinary functions
plist-values: Public ordinary functions
policy-quality: Private ordinary functions
policy-quality-in-env: Private macros
policy>: Private ordinary functions
pop-assoc: Public macros
pophash: Public ordinary functions
powerset: Public ordinary functions
prepare-int-range: Private ordinary functions
prepend: Public ordinary functions
prependf: Public macros
pretty-print-hash-table: Public ordinary functions
print-constructor: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-unit: Private ordinary functions
prod: Public ordinary functions
proper-alist?: Private ordinary functions
proper-list-without-nil?: Private ordinary functions
proper-list?: Private ordinary functions
proper-subtype-p: Public ordinary functions
proper-supertype-p: Public ordinary functions
prune: Public ordinary functions
prune-if: Public ordinary functions
push-end: Public macros
push-end-new: Public macros

Q
qappend: Public ordinary functions
qback: Public ordinary functions
qconc: Public ordinary functions
qlen: Public ordinary functions
qlist: Public ordinary functions
qpreconc: Public ordinary functions
qprepend: Public ordinary functions
queue: Public compiler macros
queue: Public ordinary functions
queue-cons: Private ordinary functions
queue-empty-p: Public ordinary functions
queuep: Public ordinary functions
quickselect: Private ordinary functions
quotation?: Private ordinary functions
quote-unless-constant: Private ordinary functions

R
random-in-range: Public compiler macros
random-in-range: Public ordinary functions
random-range-type: Private ordinary functions
range: Public compiler macros
range: Public ordinary functions
range-error: Private ordinary functions
rassocar: Public ordinary functions
rassocdr: Public ordinary functions
ravel: Public ordinary functions
read-eval-prefix: Public ordinary functions
read-float: Private ordinary functions
read-float-aux: Private ordinary functions
read-new-value: Private ordinary functions
read-only: Private ordinary functions
read-only-include-clause: Private ordinary functions
read-only-slotdef: Private ordinary functions
read-only-struct-slot-names: Private generic functions
read-only-struct-slot-names: Private generic functions
read-only-struct-slot-names: Private generic functions
read-only-struct-slot-names: Private generic functions
read-only-struct-slot-names: Private generic functions
read-only-struct-slot-names: Private generic functions
read-only-var: Private macros
real-range: Private ordinary functions
rebinding-functions: Private macros
receive: Public macros
recklessly-continue: Public ordinary functions
reduce-between: Private ordinary functions
reduce-vector-pairwise: Private ordinary functions
reify-bounds: Private ordinary functions
reinitialize-instance: Public standalone methods
remove-duplicated-subtypes: Private ordinary functions
remove-hook: Public generic functions
remove-hook: Public generic functions
remove-hook: Public generic functions
remove-shadowed: Private ordinary functions
remove-shadowed-clauses: Private ordinary functions
remove-shadowed-subtypes: Private ordinary functions
repeat-list: Private ordinary functions
repeat-sequence: Public compiler macros
repeat-sequence: Public ordinary functions
repeat-vector: Private ordinary functions
replace*: Private ordinary functions
report-group-substring: Private ordinary functions
report-static-binding-active-error: Private ordinary functions
report-static-binding-flush-error: Private ordinary functions
require-type: Private compiler macros
require-type: Private ordinary functions
require-type-for: Private compiler macros
require-type-for: Private ordinary functions
reshape: Public ordinary functions
reshuffle: Public ordinary functions
resolve-executable: Public ordinary functions
rest-op?: Private ordinary functions
rest-placeholder?: Private ordinary functions
reuse-cons: Public ordinary functions
rotation: Private ordinary functions
round-to: Public ordinary functions
run-hook: Public generic functions
run-hook: Public generic functions
run-hook: Public generic functions
run-hook-until-failure: Public generic functions
run-hook-until-failure: Public generic functions
run-hook-until-success: Public generic functions
run-hook-until-success: Public generic functions
run-hook-with-args-until-failure: Public generic functions
run-hook-with-args-until-failure: Public generic functions
run-hook-with-args-until-success: Public generic functions
run-hook-with-args-until-success: Public generic functions
run-hooks: Public ordinary functions
runs: Public ordinary functions

S
same: Public ordinary functions
same-case-p: Public ordinary functions
same-literal-p: Private ordinary functions
same-test?: Private ordinary functions
same-type?: Private ordinary functions
save-symbol-macro: Private generic functions
save-symbol-macro: Private generic functions
scan: Public ordinary functions
select: Public macros
selector: Public macros
seq-dispatch: Private macros
seq=: Public compiler macros
seq=: Public ordinary functions
seq=/2: Private ordinary functions
sequencep: Public ordinary functions
set-hash-table: Public ordinary functions
Setf Expander, (setf ensure): Public setf expanders
Setf Expander, (setf ensure2): Public setf expanders
Setf Expander, (setf read-only-var): Private macros
Setf Expander, (setf slice): Public setf expanders
Setf Expander, (setf slot-value-safe): Public setf expanders
setslice: Private ordinary functions
shadow-names: Private ordinary functions
shadow-symbol-macro: Private generic functions
shadow-symbol-macro: Private generic functions
shape: Public ordinary functions
shape=: Private ordinary functions
short-float-range: Private ordinary functions
shorter: Public ordinary functions
shortest: Public ordinary functions
shortest-list: Private ordinary functions
shortest-seq: Private ordinary functions
shortest/longest: Private ordinary functions
shrink: Public ordinary functions
shrink-wrap: Private ordinary functions
shrinkf: Public macros
si-prefix: Public ordinary functions
si-prefix-rec: Private macros
simple-binding-p: Private ordinary functions
simple-lambda-list?: Private ordinary functions
simplify-args-for-string-plus: Private ordinary functions
simplify-keylists: Private ordinary functions
simplify-string: Private ordinary functions
simplify-subtypes: Private ordinary functions
single: Public ordinary functions
single-float-range: Private ordinary functions
slice: Public ordinary functions
slice-bounds: Private ordinary functions
slot-value-safe: Public ordinary functions
sort-clauses: Private ordinary functions
sort-new: Public ordinary functions
sort-subtypes: Private ordinary functions
sort-values: Public macros
sort-values/network: Private macros
sort-values/temp-vector: Private macros
sorting-network: Private ordinary functions
speed-matters?: Private ordinary functions
splice-forms: Private generic functions
splice-forms: Private generic functions
splice-list: Private ordinary functions
splice-seq: Public ordinary functions
splice-seqf: Public macros
splice-vector: Private ordinary functions
split-at: Private ordinary functions
stable-set-difference: Public ordinary functions
stable-sort-new: Public ordinary functions
stack-flet: Private macros
standard/context: Public method combinations
static-binding-active-error: Public ordinary functions
static-binding-flush-error: Public ordinary functions
static-binding-flush-error-all-groups-p: Public generic functions
static-binding-flush-error-all-groups-p: Public generic functions
static-binding-flush-error-group: Public generic functions
static-binding-flush-error-group: Public generic functions
static-let: Public macros
static-let*: Public macros
static-load-time-value: Public macros
step-expansion: Private generic functions
step-expansion: Private generic functions
string$=: Public compiler macros
string$=: Public ordinary functions
string*=: Public compiler macros
string*=: Public ordinary functions
string+: Public compiler macros
string+: Public ordinary functions
string-case: Public macros
string-case-failure: Private ordinary functions
string-contains-p: Public compiler macros
string-contains-p: Public ordinary functions
string-count: Public ordinary functions
string-ecase: Public macros
string-gensym: Public ordinary functions
string-invert-case: Public ordinary functions
string-join: Public ordinary functions
string-prefix-p: Public compiler macros
string-prefix-p: Public ordinary functions
string-replace: Public ordinary functions
string-replace-all: Public ordinary functions
string-suffix-p: Public compiler macros
string-suffix-p: Public ordinary functions
string-token-p: Public ordinary functions
string-upcase-initials: Public ordinary functions
string^=: Public compiler macros
string^=: Public ordinary functions
string~=: Public ordinary functions
subenv: Private ordinary functions
subenv-blocks: Private ordinary functions
subenv-empty?: Private ordinary functions
subenv-funs: Private ordinary functions
subenv-tags: Private ordinary functions
subenv-vars: Private ordinary functions
subtypes-exhaustive?: Private ordinary functions
sum: Public ordinary functions
summing: Public macros
supertypep: Public ordinary functions
swaphash: Public ordinary functions
sym-numbered-placeholder?: Private ordinary functions
sym-rest-arg?: Private ordinary functions
sym-underscore?: Private ordinary functions
symbol-macro: Private ordinary functions
symbol-macro-bindings: Private ordinary functions
synchronized: Public macros

T
tagbody-tag?: Private ordinary functions
take: Public ordinary functions
take-until: Public ordinary functions
take-while: Public ordinary functions
tally: Public ordinary functions
tell: Public ordinary functions
test-fn: Private ordinary functions
test-kind: Private ordinary functions
test-load-time-value: Private compiler macros
test-load-time-value: Private ordinary functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
test.fn: Private generic functions
thread-aux: Private ordinary functions
throttle: Public ordinary functions
time-since: Public ordinary functions
time-until: Public ordinary functions
toggle-pretty-print-hash-table: Public ordinary functions
tokens: Public ordinary functions
topmost-class: Private generic functions
topmost-class: Private generic functions
toposort: Public ordinary functions
trampoline: Public ordinary functions
tree-case: Public macros
tree-ecase: Public macros
trim-whitespace: Public ordinary functions
true: Public compiler macros
true: Public ordinary functions
truly-the: Private macros
tsort: Private ordinary functions
tsort/hash-table: Private ordinary functions
tsort/list: Private ordinary functions
type-vref: Private ordinary functions
typecase-of: Public macros

U
unary->variadic: Public compiler macros
unary->variadic: Public ordinary functions
unbits: Public ordinary functions
unbound: Private ordinary functions
unbound-p: Private ordinary functions
unbound-var: Private ordinary functions
unbox: Public ordinary functions
undeq: Public ordinary functions
undisplace-array: Public ordinary functions
unique-name: Public ordinary functions
universal-to-unix: Public ordinary functions
unix-to-universal: Public ordinary functions
unoctets: Public ordinary functions
unparse-ordinary-lambda-list: Public ordinary functions
unsplice: Public ordinary functions
unwrap: Private generic functions
unwrap: Private generic functions

V
valence: Public ordinary functions
validate-superclass: Public standalone methods
value: Public generic functions
value: Public generic functions
value: Private ordinary functions
value-ref: Private ordinary functions
values-vector: Public ordinary functions
var: Private ordinary functions
var-alias-bindings: Private generic functions
var-alias-bindings: Private generic functions
var-lexical?: Private ordinary functions
variable-special?: Private ordinary functions
variable-type: Private ordinary functions
variable-type-in-env: Private macros
variadic->unary: Public compiler macros
variadic->unary: Public ordinary functions
vect: Public compiler macros
vect: Public ordinary functions
vector-conc-extend: Public ordinary functions
vector-dispatch: Private macros
vector-kind: Private ordinary functions
vector=: Public ordinary functions
visible-of-type: Private ordinary functions
void: Private ordinary functions
vref: Public macros

W
walk-tree: Public ordinary functions
whitespacep: Public ordinary functions
with-boolean: Public macros
with-bounds: Private macros
with-canonicalized-binding-accessors: Private macros
with-collector: Public macros
with-collectors: Public macros
with-hook-restart: Public macros
with-int-vector: Private macros
with-item-key-function: Public macros
with-list-bucket: Private macros
with-matched-type: Private macros
with-member-test: Public macros
with-nullable: Private macros
with-open-files: Public macros
with-read-only-vars: Public macros
with-sequence-bucket: Private macros
with-simple-vector: Private macros
with-simple-vector-dispatch: Public macros
with-specialized-buckets: Private macros
with-standard-input-syntax: Public macros
with-string: Public macros
with-string-bucket: Private macros
with-string-dispatch: Public macros
with-subtype-dispatch: Public macros
with-syms: Private macros
with-thunk: Public macros
with-two-arg-test: Public macros
with-type-declarations-trusted: Private macros
with-type-dispatch: Public macros
with-vector-bucket: Private macros
with-vector-dispatch: Public macros
with-vref: Private macros
without-internal-definitions: Private macros
without-recursion: Public macros
word-wrap: Public ordinary functions
words: Public ordinary functions
wrap-bindings: Private generic functions
wrap-bindings: Private generic functions
wrap-expr: Private generic functions
wrap-expr: Private generic functions
wrap-fn-bindings: Private generic functions
wrap-fn-bindings: Private generic functions
write-file-into-stream: Public ordinary functions
write-stream-into-file: Public ordinary functions
wrong-type: Private macros


A.3 Variables

Jump to:   %   *   +  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

%
%all-branches%: Private symbol macros
%hook-table: Private special variables
%in-branching%: Private symbol macros
%union: Public symbol macros

*
*active-groups*: Private special variables
*boolean-bypass*: Public special variables
*case-macro-target*: Private special variables
*flushable-bindings*: Private special variables
*flushing-lock*: Private special variables
*forbidden-heads*: Private special variables
*hook*: Public special variables
*internal-definitions-slots*: Private special variables
*lexenv*: Private special variables
*monitors*: Private special variables
*recursions*: Private special variables
*soft-list-cutoff*: Private special variables
*subenv*: Private special variables
*units*: Private special variables
*vref-by-type*: Private special variables

+
+alist-breakeven+: Private symbol macros
+atomic-accessors+: Private constants
+hash-table-default-size+: Private constants
+merge-tail-calls+: Public constants
+pathsep+: Private constants
+seconds-in-day+: Private constants
+seconds-in-hour+: Private constants
+storage-for-deflex-var-+alist-breakeven++: Private constants
+storage-for-deflex-var-iec-prefixes+: Private constants
+storage-for-deflex-var-no-bounds-checks+: Private constants
+storage-for-deflex-var-no-break-space+: Private constants
+storage-for-deflex-var-octet-vector-class+: Private constants
+storage-for-deflex-var-seq-cutoff+: Private constants
+storage-for-deflex-var-si-prefixes+: Private constants
+storage-for-deflex-var-si-prefixes-base-1000+: Private constants
+storage-for-deflex-var-standard-input-syntax-vars+: Private constants
+storage-for-deflex-var-whitespace+: Private constants
+unix-epoch+: Private constants

A
all-groups-p: Public conditions
args: Public conditions

B
blocks: Private structures
body: Private classes
bucket: Private structures

C
combination: Public classes
cons: Public structures
Constant, +atomic-accessors+: Private constants
Constant, +hash-table-default-size+: Private constants
Constant, +merge-tail-calls+: Public constants
Constant, +pathsep+: Private constants
Constant, +seconds-in-day+: Private constants
Constant, +seconds-in-hour+: Private constants
Constant, +storage-for-deflex-var-+alist-breakeven++: Private constants
Constant, +storage-for-deflex-var-iec-prefixes+: Private constants
Constant, +storage-for-deflex-var-no-bounds-checks+: Private constants
Constant, +storage-for-deflex-var-no-break-space+: Private constants
Constant, +storage-for-deflex-var-octet-vector-class+: Private constants
Constant, +storage-for-deflex-var-seq-cutoff+: Private constants
Constant, +storage-for-deflex-var-si-prefixes+: Private constants
Constant, +storage-for-deflex-var-si-prefixes-base-1000+: Private constants
Constant, +storage-for-deflex-var-standard-input-syntax-vars+: Private constants
Constant, +storage-for-deflex-var-whitespace+: Private constants
Constant, +unix-epoch+: Private constants
constraints: Public conditions

D
decls: Private classes
description: Public classes
disabled-handlers: Public classes

E
end1: Private structures
end2: Private structures
env: Private classes
exemplar: Private structures
exprs: Private classes

F
fn: Public classes
form: Public conditions
form: Public conditions
funs: Private structures

G
global-symbol-macros: Private classes
group: Public conditions

H
handler-class: Public classes
handler-class: Public classes
handler-class: Public classes
handler-class: Public classes
handler-class: Public classes
handler-type: Public classes
handlers: Public classes
hoisted-vars: Private classes

I
iec-prefixes: Private symbol macros
init: Private classes
initializedp: Private structures

K
key: Private structures

L
labels: Private classes
lock: Private structures

M
matched-types: Private symbol macros
matched-types-slot: Public conditions
monitor: Public classes

N
name: Public classes
name: Private structures
name: Private classes
no-bounds-checks: Private symbol macros
no-break-space: Private symbol macros

O
octet-vector-class: Private symbol macros

P
place: Public classes

R
read-only: Private structures
read-only-p: Public conditions
rest-arg: Private symbol macros
rest-op?: Private classes

S
seq-cutoff: Private symbol macros
si-prefixes: Private symbol macros
si-prefixes-base-1000: Private symbol macros
Slot, all-groups-p: Public conditions
Slot, args: Public conditions
Slot, blocks: Private structures
Slot, body: Private classes
Slot, bucket: Private structures
Slot, combination: Public classes
Slot, cons: Public structures
Slot, constraints: Public conditions
Slot, decls: Private classes
Slot, description: Public classes
Slot, disabled-handlers: Public classes
Slot, end1: Private structures
Slot, end2: Private structures
Slot, env: Private classes
Slot, exemplar: Private structures
Slot, exprs: Private classes
Slot, fn: Public classes
Slot, form: Public conditions
Slot, form: Public conditions
Slot, funs: Private structures
Slot, global-symbol-macros: Private classes
Slot, group: Public conditions
Slot, handler-class: Public classes
Slot, handler-class: Public classes
Slot, handler-class: Public classes
Slot, handler-class: Public classes
Slot, handler-class: Public classes
Slot, handler-type: Public classes
Slot, handlers: Public classes
Slot, hoisted-vars: Private classes
Slot, init: Private classes
Slot, initializedp: Private structures
Slot, key: Private structures
Slot, labels: Private classes
Slot, lock: Private structures
Slot, matched-types-slot: Public conditions
Slot, monitor: Public classes
Slot, name: Public classes
Slot, name: Private structures
Slot, name: Private classes
Slot, place: Public classes
Slot, read-only: Private structures
Slot, read-only-p: Public conditions
Slot, rest-op?: Private classes
Slot, start1: Private structures
Slot, start2: Private structures
Slot, tags: Private structures
Slot, test: Private structures
Slot, test-count: Public conditions
Slot, topmost-class: Public classes
Slot, unbox: Public structures
Slot, value: Public classes
Slot, value: Private structures
Slot, var: Private structures
Slot, var-aliases: Private classes
Slot, vars: Private structures
Slot, vars: Private classes
Slot, vars: Private classes
Slot, vector: Private structures
Slot, vector: Private classes
sorting-networks: Private symbol macros
Special Variable, %hook-table: Private special variables
Special Variable, *active-groups*: Private special variables
Special Variable, *boolean-bypass*: Public special variables
Special Variable, *case-macro-target*: Private special variables
Special Variable, *flushable-bindings*: Private special variables
Special Variable, *flushing-lock*: Private special variables
Special Variable, *forbidden-heads*: Private special variables
Special Variable, *hook*: Public special variables
Special Variable, *internal-definitions-slots*: Private special variables
Special Variable, *lexenv*: Private special variables
Special Variable, *monitors*: Private special variables
Special Variable, *recursions*: Private special variables
Special Variable, *soft-list-cutoff*: Private special variables
Special Variable, *subenv*: Private special variables
Special Variable, *units*: Private special variables
Special Variable, *vref-by-type*: Private special variables
standard-input-syntax-values: Private symbol macros
standard-input-syntax-vars: Private symbol macros
start1: Private structures
start2: Private structures
Symbol Macro, %all-branches%: Private symbol macros
Symbol Macro, %in-branching%: Private symbol macros
Symbol Macro, %union: Public symbol macros
Symbol Macro, +alist-breakeven+: Private symbol macros
Symbol Macro, iec-prefixes: Private symbol macros
Symbol Macro, matched-types: Private symbol macros
Symbol Macro, no-bounds-checks: Private symbol macros
Symbol Macro, no-break-space: Private symbol macros
Symbol Macro, octet-vector-class: Private symbol macros
Symbol Macro, rest-arg: Private symbol macros
Symbol Macro, seq-cutoff: Private symbol macros
Symbol Macro, si-prefixes: Private symbol macros
Symbol Macro, si-prefixes-base-1000: Private symbol macros
Symbol Macro, sorting-networks: Private symbol macros
Symbol Macro, standard-input-syntax-values: Private symbol macros
Symbol Macro, standard-input-syntax-vars: Private symbol macros
Symbol Macro, test/=: Private symbol macros
Symbol Macro, test/char-equal: Private symbol macros
Symbol Macro, test/char=: Private symbol macros
Symbol Macro, test/eq: Private symbol macros
Symbol Macro, test/eql: Private symbol macros
Symbol Macro, test/equal: Private symbol macros
Symbol Macro, test/equalp: Private symbol macros
Symbol Macro, underscore: Private symbol macros
Symbol Macro, whitespace: Public symbol macros

T
tags: Private structures
test: Private structures
test-count: Public conditions
test/=: Private symbol macros
test/char-equal: Private symbol macros
test/char=: Private symbol macros
test/eq: Private symbol macros
test/eql: Private symbol macros
test/equal: Private symbol macros
test/equalp: Private symbol macros
topmost-class: Public classes

U
unbox: Public structures
underscore: Private symbol macros

V
value: Public classes
value: Private structures
var: Private structures
var-aliases: Private classes
vars: Private structures
vars: Private classes
vars: Private classes
vector: Private structures
vector: Private classes

W
whitespace: Public symbol macros


A.4 Data types

Jump to:   %   -  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   Q   R   S   T   U   V   W  
Index Entry  Section

%
%binding: Private classes
%read-only-struct: Private structures
%unit: Private structures

-
->: Public types

A
absolute-directory-pathname: Public types
absolute-pathname: Public types
agroup: Private structures
array-size-difference: Private types
arrays.lisp: The serapeum/level0/arrays․lisp file
assure: Public types

B
binding: Private types
binding.lisp: The serapeum/level0/binding․lisp file
body: Private types
bounds: Private structures
box: Public structures
box.lisp: The serapeum/level0/box․lisp file

C
case-failure: Public conditions
Class, %binding: Private classes
Class, float-vector: Private classes
Class, fun: Private classes
Class, handler: Public classes
Class, handler-any: Public classes
Class, handler-number->number: Public classes
Class, handler-string->string: Public classes
Class, handler-void: Public classes
Class, hook: Public classes
Class, hook-any: Public classes
Class, hook-number->number: Public classes
Class, hook-string->string: Public classes
Class, hook-void: Public classes
Class, internal-definitions-env: Private classes
Class, macro: Private classes
Class, numeric-vector: Private classes
Class, op-env: Private classes
Class, rat-vector: Private classes
Class, symbol-macro: Private classes
Class, synchronized: Public classes
Class, test/=: Private classes
Class, test/char-equal: Private classes
Class, test/char=: Private classes
Class, test/eq: Private classes
Class, test/eql: Private classes
Class, test/equal: Private classes
Class, test/equalp: Private classes
Class, test/rat=: Private classes
Class, topmost-object-class: Public classes
Class, var: Private classes
Class, vector-wrapper: Private classes
clos.lisp: The serapeum/level0/clos․lisp file
Condition, case-failure: Public conditions
Condition, dispatch-case-error: Public conditions
Condition, econd-failure: Public conditions
Condition, inconsistent-graph: Public conditions
Condition, letrec-restriction-violation: Public conditions
Condition, recursion-forbidden: Public conditions
Condition, static-binding-active-error: Public conditions
Condition, static-binding-flush-error: Public conditions
Condition, static-load-time-value-error: Public conditions
conditions.lisp: The serapeum/level0/conditions․lisp file
contrib: The serapeum/contrib module
control-flow.lisp: The serapeum/level0/control-flow․lisp file

D
defining-types.lisp: The serapeum/level0/defining-types․lisp file
definitions.lisp: The serapeum/level0/definitions․lisp file
directory-pathname: Public types
dispatch-case-error: Public conditions
dispatch-case.lisp: The serapeum/level2/dispatch-case․lisp file

E
econd-failure: Public conditions
exporting.lisp: The serapeum/level2/exporting․lisp file
expr: Private types

F
false: Private types
fbind.lisp: The serapeum/level0/fbind․lisp file
File, arrays.lisp: The serapeum/level0/arrays․lisp file
File, binding.lisp: The serapeum/level0/binding․lisp file
File, box.lisp: The serapeum/level0/box․lisp file
File, clos.lisp: The serapeum/level0/clos․lisp file
File, conditions.lisp: The serapeum/level0/conditions․lisp file
File, control-flow.lisp: The serapeum/level0/control-flow․lisp file
File, defining-types.lisp: The serapeum/level0/defining-types․lisp file
File, definitions.lisp: The serapeum/level0/definitions․lisp file
File, dispatch-case.lisp: The serapeum/level2/dispatch-case․lisp file
File, exporting.lisp: The serapeum/level2/exporting․lisp file
File, fbind.lisp: The serapeum/level0/fbind․lisp file
File, files.lisp: The serapeum/level0/files․lisp file
File, functions.lisp: The serapeum/level0/functions․lisp file
File, generalized-arrays.lisp: The serapeum/level2/generalized-arrays․lisp file
File, hash-tables.lisp: The serapeum/level0/hash-tables․lisp file
File, heap.lisp: The serapeum/level0/heap․lisp file
File, hooks.lisp: The serapeum/level0/hooks․lisp file
File, hooks.lisp: The serapeum/contrib/hooks․lisp file
File, internal-definitions.lisp: The serapeum/level2/internal-definitions․lisp file
File, iter.lisp: The serapeum/level0/iter․lisp file
File, lists.lisp: The serapeum/level1/lists․lisp file
File, macro-tools.lisp: The serapeum/macro-tools․lisp file
File, mop.lisp: The serapeum/level2/mop․lisp file
File, numbers.lisp: The serapeum/level0/numbers․lisp file
File, octets.lisp: The serapeum/level0/octets․lisp file
File, op.lisp: The serapeum/level0/op․lisp file
File, package.lisp: The serapeum/package․lisp file
File, packages.lisp: The serapeum/level0/packages․lisp file
File, portability.lisp: The serapeum/portability․lisp file
File, queue.lisp: The serapeum/level0/queue․lisp file
File, range.lisp: The serapeum/level2/range․lisp file
File, reader.lisp: The serapeum/level0/reader․lisp file
File, sequences.lisp: The serapeum/level1/sequences․lisp file
File, serapeum.asd: The serapeum/serapeum․asd file
File, static-let.lisp: The serapeum/level0/static-let․lisp file
File, strings.lisp: The serapeum/level1/strings․lisp file
File, symbols.lisp: The serapeum/level0/symbols․lisp file
File, threads.lisp: The serapeum/level0/threads․lisp file
File, time.lisp: The serapeum/level0/time․lisp file
File, tree-case.lisp: The serapeum/level2/tree-case․lisp file
File, trees.lisp: The serapeum/level0/trees․lisp file
File, types.lisp: The serapeum/level0/types․lisp file
File, units.lisp: The serapeum/level2/units․lisp file
File, vector=.lisp: The serapeum/level2/vector=․lisp file
File, vectors.lisp: The serapeum/level1/vectors․lisp file
file-pathname: Public types
files.lisp: The serapeum/level0/files․lisp file
fixed-print-length-type: Private types
float-vector: Private classes
fun: Private classes
function-name: Private types
functions.lisp: The serapeum/level0/functions․lisp file

G
generalized-arrays.lisp: The serapeum/level2/generalized-arrays․lisp file

H
handler: Public classes
handler-any: Public classes
handler-number->number: Public classes
handler-string->string: Public classes
handler-void: Public classes
hash-tables.lisp: The serapeum/level0/hash-tables․lisp file
heap: Private structures
heap.lisp: The serapeum/level0/heap․lisp file
hook: Public classes
hook-any: Public classes
hook-number->number: Public classes
hook-string->string: Public classes
hook-void: Public classes
hooks.lisp: The serapeum/level0/hooks․lisp file
hooks.lisp: The serapeum/contrib/hooks․lisp file

I
inconsistent-graph: Public conditions
input-stream: Public types
internal-definition-form: Private types
internal-definitions-env: Private classes
internal-definitions.lisp: The serapeum/level2/internal-definitions․lisp file
iter.lisp: The serapeum/level0/iter․lisp file

K
key-designator: Private types

L
letrec-restriction-violation: Public conditions
level0: The serapeum/level0 module
level1: The serapeum/level1 module
level2: The serapeum/level2 module
lists.lisp: The serapeum/level1/lists․lisp file

M
macro: Private classes
macro-tools.lisp: The serapeum/macro-tools․lisp file
Module, contrib: The serapeum/contrib module
Module, level0: The serapeum/level0 module
Module, level1: The serapeum/level1 module
Module, level2: The serapeum/level2 module
mop.lisp: The serapeum/level2/mop․lisp file

N
no-applicable-method-error: Public types
non-wild-pathname: Public types
nor: Public types
numbers.lisp: The serapeum/level0/numbers․lisp file
numeric-vector: Private classes

O
object: Private types
octet: Public types
octet-vector: Public types
octets.lisp: The serapeum/level0/octets․lisp file
op-env: Private classes
op.lisp: The serapeum/level0/op․lisp file
output-stream: Public types

P
Package, serapeum: The serapeum package
Package, serapeum-user: The serapeum-user package
Package, serapeum.exporting: The serapeum․exporting package
Package, serapeum.sum: The serapeum․sum package
Package, serapeum.unlocked: The serapeum․unlocked package
Package, serapeum/bundle: The serapeum/bundle package
Package, serapeum/contrib/hooks: The serapeum/contrib/hooks package
Package, serapeum/dispatch-case: The serapeum/dispatch-case package
Package, serapeum/generalized-arrays: The serapeum/generalized-arrays package
Package, serapeum/internal-definitions: The serapeum/internal-definitions package
Package, serapeum/mop: The serapeum/mop package
Package, serapeum/op: The serapeum/op package
Package, serapeum/static-let: The serapeum/static-let package
Package, serapeum/vector=: The serapeum/vector= package
package.lisp: The serapeum/package․lisp file
packages.lisp: The serapeum/level0/packages․lisp file
physical-pathname: Private types
portability.lisp: The serapeum/portability․lisp file

Q
queue: Public structures
queue.lisp: The serapeum/level0/queue․lisp file

R
range.lisp: The serapeum/level2/range․lisp file
rat-vector: Private classes
reader.lisp: The serapeum/level0/reader․lisp file
real*: Private types
recursion-forbidden: Public conditions
relative-pathname: Public types

S
sequences.lisp: The serapeum/level1/sequences․lisp file
serapeum: The serapeum system
serapeum: The serapeum package
serapeum-user: The serapeum-user package
serapeum.asd: The serapeum/serapeum․asd file
serapeum.exporting: The serapeum․exporting package
serapeum.sum: The serapeum․sum package
serapeum.unlocked: The serapeum․unlocked package
serapeum/bundle: The serapeum/bundle package
serapeum/contrib/hooks: The serapeum/contrib/hooks package
serapeum/dispatch-case: The serapeum/dispatch-case package
serapeum/generalized-arrays: The serapeum/generalized-arrays package
serapeum/internal-definitions: The serapeum/internal-definitions package
serapeum/mop: The serapeum/mop package
serapeum/op: The serapeum/op package
serapeum/static-let: The serapeum/static-let package
serapeum/vector=: The serapeum/vector= package
signed-array-index: Private types
signed-array-length: Private types
single: Public types
soft-alist-of: Public types
soft-list-of: Public types
static-binding: Private structures
static-binding-active-error: Public conditions
static-binding-flush-error: Public conditions
static-let.lisp: The serapeum/level0/static-let․lisp file
static-load-time-value-error: Public conditions
string-offset: Private types
strings.lisp: The serapeum/level1/strings․lisp file
struct-to-try-instantiating: Private structures
Structure, %read-only-struct: Private structures
Structure, %unit: Private structures
Structure, agroup: Private structures
Structure, bounds: Private structures
Structure, box: Public structures
Structure, heap: Private structures
Structure, queue: Public structures
Structure, static-binding: Private structures
Structure, struct-to-try-instantiating: Private structures
Structure, subenv: Private structures
Structure, unbound: Private structures
subclass-union: Public types
subenv: Private structures
symbol-macro: Private classes
symbols.lisp: The serapeum/level0/symbols․lisp file
synchronized: Public classes
System, serapeum: The serapeum system

T
test-designator: Private types
test/=: Private classes
test/char-equal: Private classes
test/char=: Private classes
test/eq: Private classes
test/eql: Private classes
test/equal: Private classes
test/equalp: Private classes
test/rat=: Private classes
threads.lisp: The serapeum/level0/threads․lisp file
time.lisp: The serapeum/level0/time․lisp file
topmost-object-class: Public classes
tree-case.lisp: The serapeum/level2/tree-case․lisp file
trees.lisp: The serapeum/level0/trees․lisp file
true: Public types
tuple: Public types
Type, ->: Public types
Type, absolute-directory-pathname: Public types
Type, absolute-pathname: Public types
Type, array-size-difference: Private types
Type, assure: Public types
Type, binding: Private types
Type, body: Private types
Type, directory-pathname: Public types
Type, expr: Private types
Type, false: Private types
Type, file-pathname: Public types
Type, fixed-print-length-type: Private types
Type, function-name: Private types
Type, input-stream: Public types
Type, internal-definition-form: Private types
Type, key-designator: Private types
Type, no-applicable-method-error: Public types
Type, non-wild-pathname: Public types
Type, nor: Public types
Type, object: Private types
Type, octet: Public types
Type, octet-vector: Public types
Type, output-stream: Public types
Type, physical-pathname: Private types
Type, real*: Private types
Type, relative-pathname: Public types
Type, signed-array-index: Private types
Type, signed-array-length: Private types
Type, single: Public types
Type, soft-alist-of: Public types
Type, soft-list-of: Public types
Type, string-offset: Private types
Type, subclass-union: Public types
Type, test-designator: Private types
Type, true: Public types
Type, tuple: Public types
Type, variable-name: Private types
Type, wholenum: Public types
Type, wild-pathname: Public types
types.lisp: The serapeum/level0/types․lisp file

U
unbound: Private structures
units.lisp: The serapeum/level2/units․lisp file

V
var: Private classes
variable-name: Private types
vector-wrapper: Private classes
vector=.lisp: The serapeum/level2/vector=․lisp file
vectors.lisp: The serapeum/level1/vectors․lisp file

W
wholenum: Public types
wild-pathname: Public types