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.

andom-state-p 422<br />

random-state-p object Function<br />

This predicate is true if the argument is an object of type random-state; it<br />

is false otherwise.<br />

Examples:<br />

(setq x (make-random-state» => #.(RANDOM-STATE 71 1695486379 ... )<br />

(setq copy-x (make-random-state x» => #.(RANDOM-STATE 71 ...)<br />

(random-state-p x) => T<br />

(random-state-p copy-x) => T<br />

(random-state-p *random-state*) => T ;always true<br />

(random-state-p (random 18» => NIL<br />

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

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

I<br />

<strong>zl</strong>:rass predicate item alist Function<br />

(<strong>zl</strong>:rass item alist) looks up item in the association list (list of conses) alist.<br />

The value is the flrst cons whose cdr matches x according to predicate, or<br />

nil if there is none such. See the function <strong>zl</strong>:mem, page 345. As with<br />

<strong>zl</strong>:mem, you can use noncommutative predicates; the flrst argument to the<br />

predicate is item and the second is the cdr of the element of alist.<br />

For a table of related items: See the section "Functions That Operate on<br />

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

rassoc item a-list &key (test #'eql) test-not (key #'identity) Function<br />

rassoc searches the association list a-list. The value returned is the fIrst<br />

pair in a-list such that the cdr of the pair satisfles the predicate specifIed<br />

by :test, or nil if there is no such pair in a-list. rassoc is the reverse form<br />

of assoc. The keywords are:<br />

:test<br />

:test-not<br />

: key<br />

Any predicate specifying a binary operation to be applied<br />

to a supplied argument and an element of a target list.<br />

The item matches the specifIcation only if the predicate<br />

returns t. If :test is not supplied the default operation is<br />

eql.<br />

Similar to :test, except the item matches the specifIcation<br />

only if there is an element of the list for which the<br />

predicate returns nil.<br />

If not nil, should be a function of one argument that will<br />

extract from an element the part to be tested in place of<br />

the whole element.<br />

If a-list is considered to be a mapping, then rassoc treats the a-list as<br />

representing the inverse mapping. For example:

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

Saved successfully!

Ooh no, something went wrong!