The COMMON-LISP package has 978 symbols. Of them 25 are special operators and 89 macro names (see Special operators and Standard macros), about 650 are functions, and the rest are types and classes (Types and declarations), declaration names, lambda-list keywords, variables and constants. The viewer colours every one of them (it was checked against the HyperSpec symbol index): functions where they head a list or follow #', the other kinds as described on Lexical structure. This page lists the functions by what they work on, in the order of the standard’s chapters; the argument conventions are the standard’s (:test, :key, :start, :end and so on, described below).
Evaluation, compilation and control
- Evaluation:
eval,funcall,apply,identity,constantly,complement,values,values-list,function-lambda-expression,functionp,compiled-function-p,fboundp,fdefinition,fmakunbound,symbol-function,macro-function,compiler-macro-function,special-operator-p,macroexpand,macroexpand-1,constantp,proclaim. - Compilation and loading:
compile,compile-file,compile-file-pathname,load,disassemble,provide,require,make-load-form,make-load-form-saving-slots. - Mapping and sequence of control:
mapcar,mapc,maplist,mapl,mapcan,mapcon,map,map-into,maphash,not,eq,eql,equal,equalp. - Evaluation environment:
apropos,apropos-list,describe,describe-object,inspect,documentation,room,ed,dribble,sleep,get-internal-real-time,get-internal-run-time,get-universal-time,get-decoded-time,decode-universal-time,encode-universal-time,lisp-implementation-type,lisp-implementation-version,machine-instance,machine-type,machine-version,software-type,software-version,short-site-name,long-site-name,user-homedir-pathname.
Numbers
- Arithmetic:
+-*/1+1-abssignummaxminmodremfloorceilingtruncateroundffloorfceilingftruncatefroundgcdlcmisqrtsqrtexptexplognumeratordenominatorrationalrationalize. - Comparison and tests:
=/=<><=>=zeroppluspminuspevenpoddpnumberpintegerprationalprealpfloatpcomplexp. - Trigonometry:
sincostanasinacosatansinhcoshtanhasinhacoshatanhcisconjugatephaserealpartimagpartcomplex. - Floats:
floatdecode-floatinteger-decode-floatscale-floatfloat-radixfloat-signfloat-digitsfloat-precision. - Bits and bytes:
ashlogandlogiorlogxorlognotlogeqvlognandlognorlogandc1logandc2logorc1logorc2logbitplogcountlogtestinteger-lengthboole(with the constantsboole-and…)bytebyte-sizebyte-positionldbldb-testdpbmask-fielddeposit-field. - Random:
random,make-random-state,random-state-p, with*random-state*. Parsing:parse-integer.
Characters and strings
- Characters:
char-codecode-charchar-intchar-namename-charchar-upcasechar-downcasedigit-chardigit-char-pcharacterpalpha-char-palphanumericpgraphic-char-pstandard-char-pupper-case-plower-case-pboth-case-pand the comparisonschar=char/=char<char>char<=char>=char-equalchar-not-equalchar-lesspchar-greaterpchar-not-lesspchar-not-greaterp. - Strings:
stringmake-stringcharscharstringpsimple-string-pstring=string/=string<string>string<=string>=string-equalstring-not-equalstring-lesspstring-greaterpstring-not-lesspstring-not-greaterpstring-upcasestring-downcasestring-capitalizenstring-upcasenstring-downcasenstring-capitalizestring-trimstring-left-trimstring-right-trim. The rest of the string work (search,subseq,concatenate,replace,position) is by sequence functions. - String streams:
make-string-input-stream,make-string-output-stream,get-output-stream-string,with-output-to-string,with-input-from-string,read-from-string,write-to-string,prin1-to-string,princ-to-string.
Conses and lists
- Cells:
conscarcdrrplacarplacdconspatomlistpnulland the combinationscaartocddddr(28 functions);firsttotenthrestnthnthcdrlastbutlastnbutlastldifftailpendplistlist*make-listlist-lengthappendnconcrevappendnreconccopy-listcopy-alistcopy-tree. - Trees:
substsubst-ifsubst-if-notnsubstnsubst-ifnsubst-if-notsublisnsublistree-equal. - Association lists:
assocassoc-ifassoc-if-notrassocrassoc-ifrassoc-if-notaconspairlis. Property lists:getgetfget-propertiesrempropsymbol-plist. - Sets (lists as sets):
membermember-ifmember-if-notadjoinunionnunionintersectionnintersectionset-differencenset-differenceset-exclusive-ornset-exclusive-orsubsetp.
Sequences
A sequence is a list or a vector. These work on both, with the keyword parameters :key (a function applied to each element before the test), :test and :test-not (the comparison, default eql), :start and :end (a range), :from-end (right to left) and :count.
lengtheltsubseqcopy-seqfillreplacereversenreverseconcatenatemake-sequencecoercemapreducemergesortstable-sortsearchmismatch.- Finding:
findfind-iffind-if-notpositionposition-ifposition-if-notcountcount-ifcount-if-noteverysomenotanynotevery. - Changing:
removeremove-ifremove-if-notdeletedelete-ifdelete-if-notremove-duplicatesdelete-duplicatessubstitutesubstitute-ifsubstitute-if-notnsubstitutensubstitute-ifnsubstitute-if-not. The ones with annordeletemay destroy their argument; use their result, not the original.
Arrays and hash tables
- Arrays:
make-arrayadjust-arrayarefsvrefrow-major-arefarray-dimensionarray-dimensionsarray-rankarray-total-sizearray-element-typearray-displacementarray-in-bounds-parray-row-major-indexarray-has-fill-pointer-padjustable-array-pfill-pointervectorvector-pushvector-push-extendvector-poparraypvectorpsimple-vector-pupgraded-array-element-type; bit arrays:bitsbitbit-andbit-iorbit-xorbit-eqvbit-nandbit-norbit-andc1bit-andc2bit-orc1bit-orc2bit-notbit-vector-psimple-bit-vector-p. - Hash tables:
make-hash-table(:testeq,eql,equalorequalp,:size,:rehash-size,:rehash-threshold)gethash(a place)remhashclrhashmaphashhash-table-counthash-table-phash-table-testhash-table-sizehash-table-rehash-sizehash-table-rehash-thresholdsxhashand the macrowith-hash-table-iterator.
Symbols, packages and structures
The symbol and package functions are on Symbols and packages. The symbol accessors are symbol-name, symbol-package, symbol-value, symbol-function, symbol-plist, boundp, makunbound, set, symbolp, keywordp. Structures (defstruct) define their own functions; the standard ones are copy-structure and the printer hook print-object. Readers of class and slot structure: see CLOS.
Files, pathnames and streams
- Pathnames:
pathnamemake-pathnameparse-namestringmerge-pathnamesnamestringfile-namestringdirectory-namestringhost-namestringenough-namestringpathname-hostpathname-devicepathname-directorypathname-namepathname-typepathname-versionpathname-match-pwild-pathname-ptranslate-pathnamelogical-pathnametranslate-logical-pathnamelogical-pathname-translationsload-logical-pathname-translationspathnamep. - Files:
opencloseprobe-filetruenamedirectorydelete-filerename-fileensure-directories-existfile-authorfile-write-datefile-lengthfile-positionfile-string-lengthand the macrowith-open-file. - Streams:
make-broadcast-streammake-concatenated-streammake-echo-streammake-synonym-streammake-two-way-streamand their accessors,streampinput-stream-poutput-stream-pinteractive-stream-popen-stream-pstream-element-typestream-external-formatfinish-outputforce-outputclear-inputclear-outputlisten. - Reading characters and bytes:
read-charread-char-no-hangunread-charpeek-charread-lineread-byteread-sequence; writing:write-charwrite-stringwrite-linewrite-bytewrite-sequenceterprifresh-liney-or-n-pyes-or-no-p.
The printer and the reader
- Printer:
writeprin1princprintpprintwrite-to-stringprin1-to-stringprinc-to-stringformatprint-objectpprint-newlinepprint-indentpprint-tabpprint-fillpprint-linearpprint-tabularpprint-dispatchset-pprint-dispatchcopy-pprint-dispatchprint-not-readable-object; the control variables are below. - Reader:
readread-preserving-whitespaceread-delimited-listread-from-stringreadtable-casereadtablepcopy-readtableget-macro-characterset-macro-charactermake-dispatch-macro-characterget-dispatch-macro-characterset-dispatch-macro-characterset-syntax-from-char.
Special variables
The standard defines these special variables, most of them written with earmuffs (all coloured as variables by the viewer):
- Reader:
*read-base**read-default-float-format**read-eval**read-suppress**readtable**package**features**modules**gensym-counter**random-state*. - Printer:
*print-array**print-base**print-case**print-circle**print-escape**print-gensym**print-length**print-level**print-lines**print-miser-width**print-pprint-dispatch**print-pretty**print-radix**print-readably**print-right-margin*. - Streams:
*standard-input**standard-output**error-output**terminal-io**query-io**debug-io**trace-output*. - Loading and compiling:
*load-pathname**load-truename**load-print**load-verbose**compile-file-pathname**compile-file-truename**compile-print**compile-verbose**default-pathname-defaults*. - Evaluation and debugging:
*macroexpand-hook**break-on-signals**debugger-hook*. - The REPL variables
******(the last three values),++++++(the last three forms),//////(the last three lists of values) and-(the form being evaluated).
Constants
t, nil, pi (a long-float), the limits listed on Types and declarations, lambda-list-keywords and boole-1 to boole-xor (16 constants for boole).