17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

check-type 86<br />

I<br />

check-type place type &optional (type-string 'nil) Macro<br />

check-type signals an error if the contents of place are not of the desired<br />

type. If you continue from this error, you will be asked for a new value;<br />

check-type stores the new value in place and starts over, checking the type<br />

of the new value and signalling another error if it is still not of the desired<br />

type. Subforms of place cal) be evaluated multiple times because of the implicit<br />

loop generated. check-type returns nil.<br />

place must be a generalized variable reference acceptable to the macro setf.<br />

type must be a type specifier; it is not evaluated. For standard Symbolics<br />

Common Lisp type specifiers: See the section "Type Specifiers" in Symbolics<br />

Common Lisp: Language Concepts.<br />

type-string should be an English description of the type, starting with an indefinite<br />

article ("a" or "an"); it is evaluated. If type-string is not supplied,<br />

it is computed automatically from type. This optional argument is allowed<br />

because some applications of check-type may require a more specific<br />

description of what is wanted than can be generated automatically from the<br />

type specifier.<br />

The error message mentions place, its contents, and the desired type.<br />

Examples:<br />

(setq bees '(bumble wasp jacket» => (BUMBLE WASP JACKET)<br />

(check-type bees (vector integer »<br />

=> Error: The value of BEES in SI:*EVAL. (BUMBLE WASP JACKET),<br />

was of the wrong type.<br />

The function expected a vector whose typical element<br />

is an integer.<br />

(setq naards 'foo) => FDD<br />

(check-type naards (integer e *) "a positive integer")<br />

=> Error: The value of NAARDS in SI:*EVAL, FDD, was of the wrong<br />

type.<br />

The function expected a positive integer.<br />

See the section "Data Types and Type Specifiers" in Symbolics Common<br />

Lisp: Language Concepts.<br />

circular-list &rest args Function<br />

circular-list constructs a circular list whose elements are args, repeated infinitely.<br />

circular-list is the same as list except that the list itself is used<br />

as the last cdr, instead of nil. circular-list is especially useful with mapcar,<br />

as in the expression:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!