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.

integerp<br />

276<br />

(defun trailing-zeros (integer)<br />

(1- (integer-length (logand integer (- integer»»)<br />

(trailing-zeros 0) => -1<br />

iii An adequate result since there are an undefined amount<br />

iii of trailing zeros in 0<br />

(trailing-zeros 1) => 0<br />

(trailing-zeros 4) => 2<br />

(trailing-zeros 9) => 0<br />

; 4 is #b100<br />

i 9 is #b1001<br />

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

or Characteristics of Argument" in Symbolics Common Lisp: Language<br />

Concepts.<br />

integerp object Function<br />

The predicate integerp is true if its argument is an integer; it is false,<br />

otherwise.<br />

Examples:<br />

(integerp 7) => T<br />

(integerp 4.0) => NIL<br />

(integerp #c(2 0» => T i#c(2 0) is coerced to an integer<br />

(integerp "not a number") => NIL<br />

For a table of related items: See the section "Numeric Type-checking<br />

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

intern string &optional (Pkg <strong>zl</strong>:package) Function<br />

Finds or creates a symbol named string in pkg. Inherited symbols in pkg<br />

are included in the search for a symbol named string. If a symbol named<br />

string is found, it is returned. If no such symbol is found, one is created<br />

and installed in pkg as an internal symbol (if pkg is the keyword package,<br />

the symbol is installed as an external symbol).<br />

intern returns two values. The first is the symbol that was found or<br />

created. The second value is nil for newly created symbols. If the symbol<br />

returned is a pre-existing symbol, this second value is one of the following:<br />

: internal<br />

: external<br />

: inherited<br />

The symbol is present in pkg as an internal symbol.<br />

The symbol is present in pkg as an external symbol.<br />

The symbol is an internal symbol in pkg inherited by way<br />

of use-package.<br />

For more information: See the section "Mapping Names to Symbols" in<br />

Symbolics Common Lisp: Language Concepts.

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

Saved successfully!

Ooh no, something went wrong!