► 1 ACL2
 ▼ 1.4 Functions and Macros
 1.4.1 Booleans 1.4.2 Symbols 1.4.3 Strings 1.4.4 Characters 1.4.5 Rational and Complex Arithmetic 1.4.6 Bitwise Operations 1.4.7 Ordinal Arithmetic 1.4.8 Lists 1.4.9 Association Lists 1.4.10 Sets 1.4.11 Trees 1.4.12 Sequences 1.4.13 IO
##### 1.4.2Symbols

Booleans are also symbols; see Booleans for more operators.

 (keywordp x) → t x : t
Returns t if and only if x is a symbol in the "KEYWORD" package.
 Examples: > (keywordp :hints) 't > (keywordp 'hints) '() > (keywordp 5) '()

 (symbol-< x y) → t x : (symbolp x) y : (symbolp y)
Returns non-nil when the symbol-name of x lexicographically precedes that of y. The returned number is the (0-based) position at which the names differ.
 Examples: > (symbol-< 'aaa 'aab) 't > (symbol-< 'ab 'ab) '() > (symbol-< 'bb 'aa) '()

 (symbol-name x) → t x : (symbolp x)
Returns a string containing the name of the given symbol
 Examples: > (symbol-name 'hello) "HELLO" > (symbol-name 'qwerty) "QWERTY"

 (symbol-package-name x) → t x : (symbolp x)
Returns the name of the package for the given symbol.
 Examples: > (symbol-package-name 'hello) "COMMON-LISP" > (symbol-package-name :hello) "KEYWORD"

 (symbolp x) → t x : t
Determines whether x is a symbol.
 Examples: > (symbolp 'hello) 't > (symbolp "world") '()

 (intern\$ name package) → t name : (stringp name) package : (stringp package)
Produces a symbol of the given name in the given package.
 Examples: > (intern\$ "a" "ACL2") 'a > (intern\$ "b" "KEYWORD") ':b

 (intern name package)
Produces a symbol of the given name in the given package. Restricts its input to the packages "ACL2" or "KEYWORD".
 Examples: > (intern "c" "ACL2") 'c > (intern "d" "KEYWORD") ':d

 (intern-in-package-of-symbol name symbol) → t name : (stringp name) symbol : (symbolp symbol)
Produces a symbol with the given name in the package of the given symbol.
 Examples: > (intern-in-package-of-symbol "e" 'symbol) 'e > (intern-in-package-of-symbol "f" ':keyword) ':f