17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

list-all-packages 296<br />

I<br />

list-all-packages<br />

Returns a list of all the packages that exist in Genera.<br />

Function<br />

<strong>zl</strong>:listarray array &optional limit Function<br />

<strong>zl</strong>:listarray creates and returns a list whose elements are those of array.<br />

array can be any type of array or a symbol whose function cell contains an<br />

array.<br />

If limit is present, it should be an integer, and only the first limit (if there<br />

are more than that many) elements of array are used, and so the maximum<br />

length of the returned list is limit.<br />

If array is multidimensional, the elements are accessed in row-major order:<br />

the last SUbscript varies the most quickly.<br />

list-array-Ieader array &optionallimit Function<br />

list-array-Ieader creates and returns a list whose elements are those of<br />

array's leader. array can be any type of array or a symbol whose function<br />

cell contains an array.<br />

If limit is present, it should be an integer, and only the first limit (if there<br />

are more than that many) elements of array's leader are used, and so the<br />

maximum length of the returned list is limit. If array has no leader, nil is<br />

returned.<br />

<strong>zl</strong>:listify n Function<br />

Manufactures a list of n of the arguments of a lexpr. With a positive argument<br />

n, it returns a list of the first n arguments of the lexpr. With a<br />

negative argument n, it returns a list of the last (abs n) arguments of the<br />

lexpr. Basically, it works as if defined as follows:<br />

(defun listify (n)<br />

(cond «minusp n)<br />

(l;stify1 (arg nil) (+ (arg nil) n 1»)<br />

(t<br />

(listify1 n 1» »<br />

(de fun listify1 (n m) ; auxiliary function.<br />

(do «; n (1- i»<br />

(result nil (cons (arg i) result»)<br />

«< i m) result) »<br />

<strong>zl</strong>:listify exists only for compatibility with Maclisp lexprs. To write functions<br />

that can accept variable numbers of arguments, use the &optional<br />

and &rest keywords. See the section "Evaluating a Function Form" in<br />

Symbolics Common Lisp: Language Concepts.

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

Saved successfully!

Ooh no, something went wrong!