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.

167<br />

:delete-by-item<br />

rather than:<br />

(setq a (delete 'b a))<br />

(del ete 'b a)<br />

i[n] instances of item are deleted. n is allowed to be zero. If n is greater<br />

than or equal to the number of occurrences of item in the list, all occurrences<br />

of item in the list are deleted.<br />

This Zetalisp function is shadowed by the Common Lisp function of the<br />

same name.<br />

For a table of related items: See the section "Functions for Modifying<br />

Lists" in Symbolics Common Lisp: Language Concepts.<br />

For a table of related items: See the section "Sequence Modification" in<br />

Symbolics Common Lisp: Language Concepts.<br />

:delete-by-item item &optional (equal-predicate #'=) of si:heap<br />

Method<br />

Finds the first item that satisfies equal-predicate, and deletes it, returning<br />

the item and key if it was found, otherwise it signals<br />

si:heap-item-not-found. equal-predicate should be a function that takes two<br />

arguments. The first argument to equal-predicate is the current item from<br />

the heap and the second argument is item.<br />

For a table of related items: See the section "Heap Functions and Methods"<br />

in Symbolics Common Lisp: Language Concepts.<br />

:delete-by-key key &optional (equal-predicate #'=) of si:heap<br />

Method<br />

Finds the first item whose key satisfies equal-predicate and deletes it,<br />

returning the item and key if it was found; otherwise it signals<br />

si:heap-item-not-found. equal-predicate should be a function that takes two<br />

arguments. The first argument to equal-predicate is the current key from<br />

the heap and the second argument is key.<br />

For a table of related items: See the section "Heap Functions and Methods"<br />

in Symbolics Common Lisp: Language Concepts.<br />

I<br />

delete-duplicates sequence &key (test #'eqI) test-not (start 0) end Function<br />

from-end key replace<br />

delete-duplicates compares the elements of sequence pairwise, and if any<br />

two match, then the one occurring earlier in the sequence is discarded.<br />

The returned form is sequence, with enough elements removed such that no<br />

two of the remaining elements match. delete-duplicates is a destructive<br />

function.<br />

sequence can be either a list or a vector (one-dimensional array). Note that<br />

nil is considered to be a sequence, of length zero.

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

Saved successfully!

Ooh no, something went wrong!