├── html-template ├── CNAME ├── robots.txt ├── favicon.ico ├── README ├── TAGS ├── 404.html ├── source.html ├── index.html ├── printing.html ├── new-pure.css └── download.html ├── clqr.ist ├── TODO ├── paper-a4.tex ├── paper-letter.tex ├── color-black.tex ├── color-colorful.tex ├── .gitignore ├── README ├── clqr.packages.tex ├── clqr-external-environment.tex ├── clqr-typographic-conventions.tex ├── hosting └── SourceForge.net Project Registration for clqr Requires Your Attention.eml ├── clqr-hash-tables.tex ├── clqr-structures.tex ├── clqr-characters.tex ├── clqr-strings.tex ├── clqr-arrays.tex ├── Makefile ├── clqr.macros.tex ├── clqr-types-and-classes.tex ├── clqr.tex ├── clqr-packages-and-symbols.tex ├── clqr-sequences.tex ├── clqr-conses.tex ├── clqr-conditions-and-errors.tex ├── clqr-compiler.tex ├── clqr-numbers.tex ├── clqr-clos.tex └── COPYING /html-template/CNAME: -------------------------------------------------------------------------------- 1 | clqr.boundp.org 2 | -------------------------------------------------------------------------------- /html-template/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /clqr.ist: -------------------------------------------------------------------------------- 1 | % clqr 2 | % 3 | % makeindex style file 4 | % 5 | delim_0 "\\hskip 1.5ex minus 1.2ex" 6 | -------------------------------------------------------------------------------- /html-template/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trebb/clqr/master/html-template/favicon.ico -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | * find bolder bold <, >, \, {, } 2 | 3 | * in \retvalii etc number and underline in line 4 | 5 | 6 | -------------------------------------------------------------------------------- /paper-a4.tex: -------------------------------------------------------------------------------- 1 | % outsourced page dimensions for A4 paper 2 | \setlength{\paperwidth}{10.5cm} 3 | \setlength{\paperheight}{29.7cm} 4 | \renewcommand{\clearpagebeforeindex}{\clearpage} -------------------------------------------------------------------------------- /paper-letter.tex: -------------------------------------------------------------------------------- 1 | % outsourced page dimensions for letter paper 2 | \setlength{\paperwidth}{4.25in} 3 | \setlength{\paperheight}{11in} 4 | \renewcommand{\clearpagebeforeindex}{\clearpage} 5 | -------------------------------------------------------------------------------- /color-black.tex: -------------------------------------------------------------------------------- 1 | % outsourced hypertext colors 2 | % for the printer-friendly version 3 | \newcommand{\linkcolor}{black} 4 | \newcommand{\urlcolor}{black} 5 | \newcommand{\bookmarks}{false} 6 | \newcommand{\pdfpagelayout}{SinglePage} 7 | -------------------------------------------------------------------------------- /color-colorful.tex: -------------------------------------------------------------------------------- 1 | % outsourced hypertext colors 2 | % for the screen-only version 3 | \newcommand{\linkcolor}{Fuchsia} 4 | \newcommand{\urlcolor}{MidnightBlue} 5 | \newcommand{\bookmarks}{true} 6 | \newcommand{\pdfpagelayout}{TwoColumnLeft} 7 | -------------------------------------------------------------------------------- /html-template/README: -------------------------------------------------------------------------------- 1 | If you are reading this on github.com/trebb/clqr you probably want to 2 | switch to the master branch. This branch (gh-pages) only exists to 3 | populate the project homepage, http://clqr.boundp.org. 4 | 5 | Common Lisp Quick Reference is a free booklet with short descriptions 6 | of the thousand or so symbols defined in the ANSI standard. 7 | 8 | Visit http://clqr.boundp.org/ for the latest revision including 9 | ready-made pdfs. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.pdf 3 | *.ps 4 | *.dvi 5 | *.aux 6 | *.ilg 7 | *.ind 8 | *.idx 9 | *.toc 10 | *.log 11 | *.out 12 | *.mpx 13 | mpxerr.tex 14 | *.tar 15 | *.gz 16 | DATE.tex 17 | REVISION.tex 18 | clqr-types-and-classes.1 19 | clqr-types-and-classes.2 20 | clqr-types-and-classes.3 21 | clqr-types-and-classes.4 22 | clqr-types-and-classes.5 23 | *.flag 24 | color-current.tex 25 | paper-current.tex 26 | release-date.txt 27 | release-revision.txt 28 | latest-changes.html 29 | *.jpg 30 | gh-pages -------------------------------------------------------------------------------- /html-template/TAGS: -------------------------------------------------------------------------------- 1 | 2 | download.html,77 3 | Common Lisp Quick Reference4,119 4 | project page976533,1072 5 | Download37,1190 6 | 7 | index.html,104 8 | Common Lisp Quick Reference4,119 9 | project page976533,1066 10 | Introduction41,1326 11 | Latest Changes66,2349 12 | 13 | license.html,168 14 | Common Lisp Quick Reference4,119 15 | project page976533,1066 16 | License37,1184 17 | GNU Free Documentation License54,1693 18 | How to use this License for your documents508,23471 19 | 20 | printing.html,97 21 | Common Lisp Quick Reference4,119 22 | project page976533,1067 23 | Printing37,1185 24 | Bookbinding53,1916 25 | 26 | source.html,81 27 | Common Lisp Quick Reference4,119 28 | project page976533,1066 29 | LaTeX Source37,1184 30 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Common Lisp Quick Reference is a free (see file COPYING) booklet with 2 | short descriptions of the thousand or so symbols defined in the ANSI 3 | standard. 4 | 5 | 6 | It builds well on a Debian system with the packages texlive-metapost, 7 | texlive-latex-recommended, texlive-latex-extra, and their dependencies 8 | installed. 9 | 10 | On FreeBSD, (at least) ports gmake and texlive-full are required. 11 | 12 | If you have those dependencies in place, type 13 | 14 | $ make 15 | 16 | and be patient. 17 | 18 | 19 | If you end up with three blank pages at the end you can try to blank a 20 | fourth page by changing 21 | 22 | \renewcommand{\clearpagebeforeindex}{\clearpage} 23 | 24 | to 25 | 26 | \renewcommand{\clearpagebeforeindex}{} 27 | 28 | in file paper-.tex. 29 | 30 | Visit http://clqr.boundp.org/ for the latest revision including 31 | ready-made pdfs. 32 | -------------------------------------------------------------------------------- /clqr.packages.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2011, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | %\usepackage[T1]{fontenc} % problem with index font 9 | \usepackage{amsmath} 10 | %\usepackage{amsfonts} 11 | \usepackage{amssymb} 12 | 13 | %\usepackage[mathcal]{euscript} 14 | 15 | \usepackage{rotating} 16 | %\usepackage{graphicx} 17 | \usepackage{multicol} 18 | %\usepackage{textcase} 19 | \usepackage{textcomp} 20 | \usepackage{ulem} 21 | \usepackage[usenames,dvips]{color} 22 | \usepackage{suffix} 23 | \usepackage{makeidx} 24 | \definecolor{frontcovergray}{gray}{.85} 25 | \definecolor{backcovergray}{gray}{.9} 26 | %\usepackage[pagestyles]{titlesec} 27 | \usepackage{scrlayer-scrpage} 28 | %\usepackage{titletoc} 29 | % 30 | %%%%%%%%%%%%%%%%%% 31 | % Two font alternatives: 32 | % (A) All (except cover pages) Computer Modern -- 33 | % everything comes from the same sound root; gets about 5% longer 34 | % than alternative (B) 35 | \usepackage{type1cm} 36 | \usepackage{exscale} 37 | %%%%%%%%%%%%%%%%%% 38 | % (B) Times mixed with Helvetica -- 39 | % different sources; need scaling as they don't even agree in 40 | % their concept of height 41 | %\usepackage{mathptmx} 42 | %\usepackage[scaled]{helvet} 43 | %%%%%%%%%%%%%%%%%% 44 | % 45 | -------------------------------------------------------------------------------- /html-template/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Common Lisp Quick Reference: 404 6 | 7 | 8 | 9 | 10 | 11 | 12 | The page you requested doesn't seem to exist. You may wish to visit 13 |

Common Lisp Quick Reference

14 | You will be redirected there. 15 | 16 | 21 | 23 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /clqr-external-environment.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2010, 2011, 2012, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | \section{External Environment} 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | \begin{LIST}{1cm} 13 | 14 | \IT{\arrGOO{(\FU*{GET-INTERNAL-REAL-TIME})\\ 15 | (\FU*{GET-INTERNAL-RUN-TIME})}{.}} 16 | { 17 | \retval{Current time}, or \retval{computing time}, 18 | respectively, in clock ticks. 19 | } 20 | 21 | \IT{\CNS*{INTERNAL-TIME-UNITS-PER-SECOND}} 22 | { 23 | Number of clock ticks per second. 24 | } 25 | 26 | \IT{\arrGOO{% 27 | (\FU*{ENCODE-UNIVERSAL-TIME} 28 | \VAR{ sec } \VAR{min } 29 | \VAR{hour } \VAR{date } 30 | \VAR{month } \VAR{year } 31 | \Op{\VAR{zone}\DF{curr}})\\ 32 | (\FU*{GET-UNIVERSAL-TIME})}{.}} 33 | { 34 | \retval{Seconds from 1900-01-01, 00:00}, ignoring leap seconds. 35 | } 36 | 37 | \IT{\arrGOO{(\FU*{DECODE-UNIVERSAL-TIME} \VAR{ universal-time } 38 | \Op{\VAR{time-zone}\DF{current}})\\ 39 | (\FU*{GET-DECODED-TIME})}{.}} 40 | { 41 | Return \retval{second}, \retvalii{minute}, \retvaliii{hour}, 42 | \retvaln{4}{date}, \retvaln{5}{month}, \retvaln{6}{year}, 43 | \retvaln{7}{day}, \retvaln{8}{daylight-p}, and \retvaln{9}{zone}. 44 | } 45 | 46 | \IT{\arrGOO{(\FU*{SHORT-SITE-NAME})\\ 47 | (\FU*{LONG-SITE-NAME})}{.}} 48 | { 49 | \retval{String} representing physical location of computer. 50 | } 51 | 52 | \IT{(\xorGOO{\FU{LISP-IMPLEMENTATION}\\ 53 | \FU{SOFTWARE}\\ 54 | \FU{MACHINE}}{\}}\kwd{-}% 55 | \xorGOO{\kwd{TYPE}\\ 56 | \kwd{VERSION}}{\}})} 57 | { 58 | \index{LISP-IMPLEMENTATION-TYPE}% 59 | \index{LISP-IMPLEMENTATION-VERSION}% 60 | \index{SOFTWARE-TYPE}% 61 | \index{SOFTWARE-VERSION}% 62 | \index{MACHINE-TYPE}% 63 | \index{MACHINE-VERSION}% 64 | \retval{Name} or \retval{version} of implementation, operating 65 | system, or hardware, respectively. 66 | } 67 | 68 | \IT{(\FU*{MACHINE-INSTANCE})} 69 | { 70 | \retval{Computer name}. 71 | } 72 | 73 | \end{LIST} 74 | 75 | 76 | %%% Local Variables: 77 | %%% mode: latex 78 | %%% TeX-master: "clqr" 79 | %%% End: 80 | -------------------------------------------------------------------------------- /clqr-typographic-conventions.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2012, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 9 | \section*{Typographic Conventions} 10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 11 | 12 | \begin{LIST}{1cm} 13 | 14 | \IT{\kwd{NAME}; \FU{NAME}; \GFU{NAME}; \MC{NAME}; \SO{NAME}; \V{\A name\A}; 15 | \CNS{name}} 16 | { 17 | Symbol defined in Common Lisp; esp.\ function, generic function, 18 | macro, special operator, variable, constant. 19 | } 20 | 21 | \IT{\VAR{them}\qquad\qquad\qquad} 22 | { 23 | Placeholder for actual code. 24 | } 25 | 26 | \IT{\LIT{me}\qquad\qquad\qquad\qquad} 27 | { 28 | Literal text. 29 | } 30 | 31 | \IT{\Op{\VAR{foo}\DF{\LIT{bar}}}\qquad\qquad} 32 | { 33 | Either one \VAR{foo} or nothing; defaults to \LIT{bar}. 34 | } 35 | 36 | \IT{\OPn{\VAR{foo}}; \Goos{\VAR{foo}}} 37 | { 38 | Zero or more \VAR{foo}s. 39 | } 40 | 41 | \IT{\RP{\VAR{foo}}; \Goop{\VAR{foo}}} 42 | { 43 | One or more \VAR{foo}s. 44 | } 45 | 46 | \IT{\VAR{foos}\qquad\qquad\qquad} 47 | { 48 | English plural denotes a list argument. 49 | } 50 | 51 | \IT{\Goo{\VAR{foo}\XOR\VAR{bar}\XOR\VAR{baz}}; 52 | \xorGOO{ 53 | \VAR{foo}\\ 54 | \VAR{bar}\\ 55 | \VAR{baz}% 56 | }{.}} 57 | { 58 | Either \VAR{foo}, or \VAR{bar}, or \VAR{baz}. 59 | } 60 | 61 | \IT{\orGOO{ 62 | \VAR{foo}\\ 63 | \VAR{bar}\\ 64 | \VAR{baz} 65 | }{.}} 66 | { 67 | Anything from none to each of \VAR{foo}, \VAR{bar}, and \VAR{baz}. 68 | } 69 | 70 | \IT{\NEV{\VAR{foo}}\qquad\qquad\qquad} 71 | { 72 | Argument \VAR{foo} is not evaluated. 73 | } 74 | 75 | \IT{\DES{\VAR{bar}}\qquad\qquad\qquad} 76 | { 77 | Argument \VAR{bar} is possibly modified. 78 | } 79 | 80 | \IT{\PROGN{\VAR{foo}}\qquad\qquad\qquad} 81 | { 82 | \OPn{\VAR{foo}} is evaluated as in \SO{progn}; see page \pageref{:progn}. 83 | } 84 | 85 | \IT{\retval{\VAR{foo}}; \retvalii{\VAR{bar}}; 86 | \retvaln{\VAR{n}}{\VAR{baz}}} 87 | { 88 | Primary, secondary, and \VAR{n}th return value. 89 | } 90 | 91 | \IT{\T; \NIL\qquad\qquad\qquad} 92 | { 93 | \kwd*{T}, or truth in general; and \kwd*{NIL} or \kwd{()}. 94 | } 95 | 96 | \end{LIST} 97 | 98 | %%% Local Variables: 99 | %%% mode: latex 100 | %%% TeX-master: "clqr" 101 | %%% End: 102 | -------------------------------------------------------------------------------- /html-template/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Common Lisp Quick Reference: Source 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 31 | 60 | 61 | 62 | 65 | 66 | 67 | 73 | 74 |
16 | Common Lisp Quick Reference 17 |
21 | 30 | 32 |

LaTeX Source

33 |

34 | Download 35 |

clqr.tar.gz
37 | to get a recent snapshot. 38 |

39 |

 

40 |

41 | Alternatively, you can clone CLQR's source code repository by 42 |

43 |
  git clone git://github.com/trebb/clqr.git
44 |

45 | or 46 |

47 |
  git clone git://repo.or.cz/clqr.git
48 |

49 | or 50 |

51 |
  git clone http://repo.or.cz/r/clqr.git
52 |

 

53 |

54 | And you can browse the repository 55 | at GitHub 56 | or 57 | at repo.or.cz. 58 |

59 |
75 | 76 | 81 | 83 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /hosting/SourceForge.net Project Registration for clqr Requires Your Attention.eml: -------------------------------------------------------------------------------- 1 | Delivered-To: trebbu@gmail.com 2 | Received: by 10.143.9.3 with SMTP id m3cs33882wfi; 3 | Wed, 4 Jun 2008 13:12:22 -0700 (PDT) 4 | Received: by 10.151.153.14 with SMTP id f14mr697779ybo.73.1212610341334; 5 | Wed, 04 Jun 2008 13:12:21 -0700 (PDT) 6 | Return-Path: 7 | Received: from mail.sourceforge.net (lists.sourceforge.net [66.35.250.206]) 8 | by mx.google.com with ESMTP id f60si7027717pyh.37.2008.06.04.13.12.20; 9 | Wed, 04 Jun 2008 13:12:21 -0700 (PDT) 10 | Received-SPF: pass (google.com: domain of nobody@sourceforge.net designates 66.35.250.206 as permitted sender) client-ip=66.35.250.206; 11 | Authentication-Results: mx.google.com; spf=pass (google.com: domain of nobody@sourceforge.net designates 66.35.250.206 as permitted sender) smtp.mail=nobody@sourceforge.net 12 | Received: from sc8-sf-web24-b.sourceforge.net ([10.3.1.214] helo=sc8-sf-web24.sourceforge.net) 13 | by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) 14 | (Exim 4.44) 15 | id 1K3zLH-0000qF-5Q 16 | for trebbu@googlemail.com; Wed, 04 Jun 2008 13:12:20 -0700 17 | Received: from nobody by sc8-sf-web24.sourceforge.net with local (Exim 4.43) 18 | id 1K3zLG-00020i-RZ 19 | for trebbu@googlemail.com; Wed, 04 Jun 2008 13:12:19 -0700 20 | To: trebbu@googlemail.com 21 | Subject: SourceForge.net Project Registration for clqr Requires Your Attention 22 | From: "SourceForge.net" 23 | Content-type: text/html 24 | Message-Id: 25 | Sender: Nobody 26 | Date: Wed, 04 Jun 2008 13:12:18 -0700 27 | X-Spam-Score: 2.7 (++) 28 | X-Spam-Report: Spam Filtering performed by sourceforge.net. 29 | See http://spamassassin.org/tag/ for more details. 30 | Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 31 | 0.0 HTML_MESSAGE BODY: HTML included in message 32 | 0.1 HTML_00_10 BODY: Message is 0% to 10% HTML 33 | 2.0 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 34 | 0.5 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME headers 35 | 0.1 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag 36 | 37 | Content generator rejection
Proposed Descriptive Name: Common Lisp Quick Reference
Proposed Unix Name: clqr
Registration Description: Common Lisp Quick Reference is a free booklet with short descriptions of the symbols defined in the ANSI standard.

Greetings, 38 | 39 | The project you are requesting is being rejected, as we have determined that it is a content generating project, rather than a project developing Open Source Software. 40 | 41 | SourceForge.net exists to allow projects a development environment for creating Open Source Software. Its purpose is not to host personal content or content which may take up our resources but which no real software development may be realized. 42 | 43 | Based on the description of the project you have provided us, your project is being rejected. 44 | 45 | Thank you, 46 | 47 | SourceForge.net Support

Link to Project Registration Application: https://sourceforge.net/register-project/?regid=137049 48 | -------------------------------------------------------------------------------- /clqr-hash-tables.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2012, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | \section{Hash Tables} 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | The Loop Facility provides additional hash table-related 13 | functionality; see \kwd{loop}, page \pageref{section:Loop Facility}. 14 | 15 | Key-value storage similar to hash tables can as well be achieved using 16 | association lists and property lists; see 17 | pages \pageref{section:Association Lists} and \pageref{:property_lists}. 18 | 19 | 20 | \begin{LIST}{1cm} 21 | 22 | \IT{(\FU*{HASH-TABLE-P} \VAR{foo})} 23 | { 24 | Return \retval{\T} if \VAR{foo} is of type \kwd{hash-table}. 25 | } 26 | 27 | \IT{(\FU*{MAKE-HASH-TABLE} 28 | \orGOO{\kwd{:test }\Goo{\FU{eq}\XOR \FU{eql}\XOR 29 | \FU{equal} \XOR \FU{equalp}}\DF{\kwd{\#'eql}}\\ 30 | \kwd{:size} \VAR{ int}\\ 31 | \kwd{:rehash-size} \VAR{ num}\\ 32 | \kwd{:rehash-threshold} \VAR{ num}}{\}})} 33 | { 34 | Make a \retval{hash table}. 35 | } 36 | 37 | \IT{(\FU*{GETHASH} \VAR{key} \VAR{hash-table} \Op{\VAR{default}\DF{\NIL}})} 38 | { 39 | Return \retval{object} with \VAR{key} if any or \retval{\VAR{default}} 40 | otherwise; and \retvalii{\T} if found, \retvalii{\NIL} 41 | otherwise. \kwd{setf}able. 42 | } 43 | 44 | \IT{(\FU*{HASH-TABLE-COUNT} \VAR{hash-table})} 45 | { 46 | \retval{Number of entries} in \VAR{hash-table}. 47 | } 48 | 49 | \IT{(\FU*{REMHASH} \VAR{key} \DES{\VAR{hash-table}})} 50 | { 51 | Remove from \VAR{hash-table} entry with \VAR{key} and return 52 | \retval{\T} if it existed. Return \retval{\NIL} otherwise. 53 | } 54 | 55 | \IT{(\FU*{CLRHASH} \DES{\VAR{hash-table}})} 56 | { 57 | Empty \retval{\VAR{hash-table}}. 58 | } 59 | 60 | \IT{(\FU*{MAPHASH} \VAR{function} \VAR{hash-table})} 61 | { 62 | Iterate over \VAR{hash-table} calling \VAR{function} on key 63 | and value. Return \retval{\NIL}. 64 | } 65 | 66 | \IT{(\MC*{WITH-HASH-TABLE-ITERATOR} (\VAR{foo} \VAR{hash-table}) 67 | \OPn{(\kwd{declare} \OPn{\NEV{\VAR{decl}}})} \PROGN{\VAR{form}})} 68 | { 69 | Return \retval{values of \VAR{form}s}. In \VAR{form}s, 70 | invocations of (\VAR{foo}) return: \T\ if an entry is returned; 71 | its key; its value. 72 | } 73 | 74 | \IT{(\FU*{HASH-TABLE-TEST} \VAR{hash-table})} 75 | { 76 | \retval{Test function} used in \VAR{hash-table}. 77 | } 78 | 79 | \IT{\arrGOO{(\FU*{HASH-TABLE-SIZE} \VAR{ hash-table})\\ 80 | (\FU*{HASH-TABLE-REHASH-SIZE} \VAR{ hash-table})\\ 81 | (\FU*{HASH-TABLE-REHASH-THRESHOLD} \VAR{ hash-table})}{.}} 82 | { 83 | Current \retval{size}, \retval{rehash-size}, or 84 | \retval{rehash-threshold}, respectively, as used in \FU{make-hash-table}. 85 | } 86 | 87 | \IT{(\FU*{SXHASH} \VAR{foo})} 88 | { 89 | \retval{Hash code} unique for any argument \FU{equal} \VAR{foo}. 90 | } 91 | 92 | \end{LIST} 93 | 94 | 95 | 96 | %%% Local Variables: 97 | %%% mode: latex 98 | %%% TeX-master: "clqr" 99 | %%% End: 100 | -------------------------------------------------------------------------------- /html-template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Common Lisp Quick Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 31 | 63 | 64 | 65 | 68 | 69 | 70 | 76 | 77 |
16 | Common Lisp Quick Reference 17 |
21 | 30 | 32 | 33 | [Front Cover Sample] 35 | 36 |

Introduction

37 |

Common Lisp Quick Reference is a free booklet with short 38 | descriptions of the thousand or so symbols defined in the ANSI standard. 39 | It comes with a comprehensive index. 40 |

41 |

42 | This rather humble effort is by no means meant to rival 43 | the 44 | Common Lisp HyperSpec 45 | or any of the great introductory web resources and books. 46 | Its purpose is to give those who like a piece of 47 | dead tree in their hands a quick overview on things they 48 | know already, or some clue on what to look up elsewhere. 49 |

50 | 51 |

It is written in LaTeX and formatted for printing on both 52 | A4 and letter paper. After folding the sheets lengthwise, 53 | they can easily be turned into a handy booklet. 54 |

55 |

56 | Please report any errors to 57 | trebbu@googlemail.com. Nitpickers welcome! 58 |

59 |

 

60 | 61 |

Latest Changes

62 |
78 | 79 | 84 | 86 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /html-template/printing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Common Lisp Quick Reference: Printing 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 31 | 62 | 63 | 64 | 67 | 68 | 69 | 75 | 76 |
16 | Common Lisp Quick Reference 17 |
21 | 30 | 32 |

Printing

33 | Choose a file which has your paper size (i.e. "-a4-" or US "-letter-") 34 | and "-booklet-" in its name. Then, a page order suitable for 35 | nested folios is indicated by "-all"; if you want the folios 36 | stacked take a file which says "-four". 37 |

38 | That is clqr-<paper size>-booklet-<page order>.pdf 39 |

40 | On a duplex printer, just print the file. If your printer 41 | can only print on one side of the sheet, start with the odd 42 | pages. Depending on your printer's paper handling, you may 43 | or may not have to rearrange the half-printed sheets. Make 44 | sure the first page is on top and put them back into the 45 | paper tray in order to print the even pages. 46 | 47 | 48 |

Bookbinding

49 |

50 | One by one, fold the pages in half lengthwise. 51 |

52 | As to the nested version, if you have a big enough 53 | (saddle stitch) stapler, put two staples along the spine. 54 | Alternatively, you can sew the pages together with a 55 | heavy thread. Or you simply let the pages unbound. 56 | The edges of the paper opposite the spine will not line up 57 | perfectly here. 58 |

59 | The variant with stacked folios is suitable for wire 60 | or comb binding, or you put some elastic glue along the spine. 61 |

77 | 78 | 83 | 85 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /clqr-structures.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2012, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | \section{Structures} 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | 13 | \begin{LIST}{1cm} 14 | 15 | \IT{(\MC*{DEFSTRUCT} 16 | \xorGOO{\VAR{foo}\\ 17 | (\VAR{foo\hspace{.5ex}} 18 | \orGOO{% 19 | \xorGOO{% 20 | \kwd{:conc-name}\\ 21 | (\kwd{:conc-name } \Op{\NEV{\VAR{slot-prefix}}\DF{\VAR{foo}\LIT{-}}})}{.}\\ 22 | \xorGOO{% 23 | \kwd{:constructor}\\ 24 | (\kwd{:constructor } 25 | \OP{\NEV{\VAR{maker}}\DF{\LIT{MAKE-}\VAR{foo}}\text{ } 26 | \Op{({\OPn{\NEV{\VAR{ord-$\lambda$}}}})}})}{\}^{\!\!*}}\\ 27 | \xorGOO{% 28 | \kwd{:copier}\\ 29 | (\kwd{:copier } 30 | \Op{\NEV{\VAR{copier}}\DF{\LIT{COPY-}\VAR{foo}}})}{.}\\ 31 | (\kwd{:include\hspace{.5ex}} \NEV{\VAR{struct}}% disabled to save space %\text{ } 32 | \xorGOO{% 33 | \NEV{\VAR{slot}}\\ 34 | (\NEV{\VAR{slot}}\text{\hspace{.5ex}} \Op{\VAR{init}% disabled to save space %\text{ } 35 | \orGOO{ 36 | \kwd{:type\hspace{.5ex}} \NEV{\VAR{sl-type}}\\ 37 | \kwd{:read-only } \NEV{\VAR{b}}}{\}}})\\ 38 | }{\}^{\!\!*}})\\ 39 | \xorGOO{ 40 | (\kwd{:type } \xorGOO{\kwd{list}\\ 41 | \kwd{vector}\\ 42 | (\kwd{vector }\NEV{\VAR{type}})}{\}})\text{ } 43 | \Op{(\kwd{:initial-offset } \NEV{\VAR{n}})}\\ 44 | \xorGOO{ 45 | (\kwd{:print-object } \Op{\NEV{\VAR{o-printer}}})\\ 46 | (\kwd{:print-function } \Op{\NEV{\VAR{f-printer}}}) 47 | }{.} 48 | }{.}\\ 49 | \kwd{:named}\\ 50 | \xorGOO{% 51 | \kwd{:predicate}\\ 52 | (\kwd{:predicate } \Op{\NEV{\VAR{p-name}}\DF{\VAR{foo}\LIT{-P}}})}{.} 53 | }{\}}% 54 | )% 55 | }{\}} 56 | \Op{\NEV{\VAR{doc}}} 57 | \xorGOO{ 58 | \VAR{slot}\\ 59 | (\VAR{slot } \Op{\VAR{init}\text{ } 60 | \orGOO{ 61 | \kwd{:type } \NEV{\VAR{slot-type}}\\ 62 | \kwd{:read-only } \NEV{\VAR{bool}} 63 | }{\}}}) 64 | }{\}^{\!\!*}}% 65 | )} 66 | { 67 | Define structure \retval{\VAR{foo}} together with functions 68 | \LIT{MAKE-}\VAR{foo}, \LIT{COPY-}\VAR{foo} and 69 | \VAR{foo}\LIT{-P}; and \kwd{setf}able accessors 70 | \VAR{foo}\LIT{-}\VAR{slot}. Instances are of class \VAR{foo} or, if 71 | \kwd{defstruct} option \kwd{:type} is given, of the specified type. 72 | They can be 73 | created by (\LIT{MAKE-}\VAR{foo} \Goos{\kwd{:}\VAR{slot} 74 | \VAR{value}}) or, if \VAR{ord-$\lambda$} (see 75 | page \pageref{section:Functions}) is given, by (\VAR{maker} 76 | \OPn{\VAR{arg}} \Goos{\kwd{:}\VAR{key} \VAR{value}}). In the latter 77 | case, \VAR{arg}s and \kwd{:}\VAR{key}s correspond to the positional 78 | and keyword parameters defined in \VAR{ord-$\lambda$} whose 79 | \VAR{var}s in turn correspond to \VAR{slot}s. 80 | \kwd{:print-object}/\kwd{:print-function} generate a 81 | \GFU{print-object} method for an instance \VAR{bar} of \VAR{foo} 82 | calling (\VAR{o-printer} \VAR{bar} \VAR{stream}) or (\VAR{f-printer} 83 | \VAR{bar} \VAR{stream} \VAR{print-level}), respectively. 84 | If \kwd{:type} without \kwd{:named} is given, no \VAR{foo}\LIT{-P} 85 | is created. 86 | } 87 | 88 | \IT{(\FU*{COPY-STRUCTURE} \VAR{structure})} 89 | { 90 | Return \retval{copy of \VAR{structure}} with shared slot values. 91 | } 92 | 93 | \end{LIST} 94 | 95 | 96 | 97 | %%% Local Variables: 98 | %%% mode: latex 99 | %%% TeX-master: "clqr" 100 | %%% End: 101 | -------------------------------------------------------------------------------- /clqr-characters.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2010, 2011, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | \section{Characters} 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | 13 | The \kwd*{standard-char} type comprises \LIT{a}-\LIT{z}, 14 | \LIT{A}-\LIT{Z}, \LIT{0}-\LIT{9}, \LIT{Newline}, \LIT{Space}, and 15 | \LIT{!?\$"'`.:,;*+-/|{\char`\\}\TLD\_\^{}<=>\#\%@\&()[]\{\}}. 16 | \index{NEWLINE}\index{SPACE} 17 | 18 | \begin{LIST}{1cm} 19 | 20 | \IT{\arrGOO{(\FU*{CHARACTERP} \VAR{ foo})\\ 21 | (\FU*{STANDARD-CHAR-P} \VAR{ char})}{.}} 22 | { 23 | \retval{\T} if argument is of indicated type. 24 | } 25 | 26 | \IT{\arrGOO{(\FU*{GRAPHIC-CHAR-P} \VAR{ character})\\ 27 | (\FU*{ALPHA-CHAR-P} \VAR{ character})\\ 28 | (\FU*{ALPHANUMERICP} \VAR{ character})}{.}} 29 | { 30 | \retval{\T} if \VAR{character} is visible, alphabetic, or 31 | alphanumeric, respectively. 32 | } 33 | 34 | \IT{\arrGOO{(\FU*{UPPER-CASE-P} \VAR{ character})\\ 35 | (\FU*{LOWER-CASE-P} \VAR{ character})\\ 36 | (\FU*{BOTH-CASE-P} \VAR{ character})}{.}} 37 | { 38 | Return \retval{\T} if \VAR{character} is uppercase, lowercase, or 39 | able to be in another case, respectively. 40 | } 41 | 42 | \IT{(\FU*{DIGIT-CHAR-P} \VAR{character} 43 | \Op{\VAR{radix}\DF{\LIT{10}}})} 44 | { 45 | Return \retval{its weight} if \VAR{character} is a digit, or 46 | \retval{\NIL} otherwise. 47 | } 48 | 49 | \IT{\arrGOO{(\FU*{CHAR=}\RP{\VAR{ 50 | character}})\\(\FU*{CHAR/=}\RP{\VAR{ 51 | character}})}{.}} 52 | { 53 | Return \retval{\T} if all \VAR{character}s, or 54 | none, respectively, are equal. 55 | } 56 | 57 | \IT{\arrGOO{(\FU*{CHAR-EQUAL}\RP{\VAR{ 58 | character}})\\(\FU*{CHAR-NOT-EQUAL}\RP{\VAR{ 59 | character}})}{.}} 60 | { 61 | Return \retval{\T} if all \VAR{character}s, or 62 | none, respectively, are equal ignoring case. 63 | } 64 | 65 | \IT{\arrGOO{(\FU{CHAR\boldmath$>$}\RP{\VAR{ 66 | character}})\\(\FU{CHAR\boldmath$>$=}\RP{\VAR{ 67 | character}})\\(\FU{CHAR\boldmath$<$}\RP{\VAR{ 68 | character}})\\(\FU{CHAR\boldmath$<$=}\RP{\VAR{ 69 | character}})}{.}} 70 | { 71 | \index{CHAR>@CHAR$>$}% 72 | \index{CHAR>=@CHAR$>$=}% 73 | \index{CHAR<@CHAR$<$}% 74 | \index{CHAR<=@CHAR$<$=}% 75 | Return \retval{\T} if \VAR{character}s are 76 | monotonically decreasing, monotonically non-increasing, monotonically 77 | increasing, or monotonically non-decreasing, respectively. 78 | } 79 | 80 | \IT{\arrGOO{ 81 | (\FU*{CHAR-GREATERP}\RP{\VAR{ character}})\\ 82 | (\FU*{CHAR-NOT-LESSP}\RP{\VAR{ character}})\\ 83 | (\FU*{CHAR-LESSP}\RP{\VAR{ character}})\\ 84 | (\FU*{CHAR-NOT-GREATERP}\RP{\VAR{ character}})}{.}} 85 | { 86 | Return \retval{\T} if \VAR{character}s are monotonically 87 | decreasing, monotonically non-increasing, monotonically 88 | increasing, or monotonically non-decreasing, respectively, 89 | ignoring case. 90 | } 91 | 92 | \IT{\arrGOO{(\FU*{CHAR-UPCASE} \VAR{ character})\\ 93 | (\FU*{CHAR-DOWNCASE} \VAR{ character})}{.}} 94 | { 95 | Return corresponding uppercase/lowercase \retval{character}, 96 | respectively. 97 | } 98 | 99 | \IT{(\FU*{DIGIT-CHAR} \VAR{i} \Op{\VAR{radix}\DF{\LIT{10}}})} 100 | { 101 | \retval{Character} representing digit \VAR{i}. 102 | } 103 | 104 | \IT{(\FU*{CHAR-NAME} \VAR{char})} 105 | { 106 | \VAR{char}'s \retval{name} if any, or 107 | \retval{\NIL}. 108 | } 109 | 110 | \IT{(\FU*{NAME-CHAR} \VAR{foo})\qquad\qquad} 111 | { 112 | \retval{Character} named \VAR{foo} if any, or 113 | \retval{\NIL}. 114 | } 115 | 116 | \IT{\arrGOO{(\FU*{CHAR-INT} \VAR{ character})\\ 117 | (\FU*{CHAR-CODE} \VAR{ character})}{.}} 118 | { 119 | \retval{Code} of \VAR{character}. 120 | } 121 | 122 | \IT{(\FU*{CODE-CHAR} \VAR{code})\qquad\qquad} 123 | { 124 | \retval{Character} with \VAR{code}. 125 | } 126 | 127 | \IT{\CNS*{CHAR-CODE-LIMIT}} 128 | { 129 | Upper bound of (\FU{CHAR-CODE} \VAR{char}); $\geq 96$. 130 | } 131 | 132 | \IT{(\FU*{CHARACTER} \VAR{c})} 133 | { 134 | Return \retval{\kwd{\#$\backslash$}\VAR{c}}. 135 | } 136 | 137 | \end{LIST} 138 | 139 | %%% Local Variables: 140 | %%% mode: latex 141 | %%% TeX-master: "clqr" 142 | %%% End: 143 | -------------------------------------------------------------------------------- /clqr-strings.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2010, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | \section{Strings} 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | Strings can as well be manipulated by array and sequence functions; 13 | see pages \pageref{section:Arrays} and \pageref{section:Sequences}. 14 | 15 | \begin{LIST}{1cm} 16 | 17 | 18 | \IT{\arrGOO{(\FU*{STRINGP} \VAR{ foo})\\ 19 | (\FU*{SIMPLE-STRING-P} \VAR{ foo})}{.}} 20 | { 21 | \retval{\T} if \VAR{foo} is of indicated type. 22 | } 23 | 24 | \IT{(\xorGOO{\FU*{STRING=}\\\FU*{STRING-EQUAL}}{\}} \VAR{foo} 25 | \VAR{bar} 26 | \orGOO{\kwd{:start1} \VAR{ start-foo}\DF{\LIT{0}}\\ 27 | \kwd{:start2} \VAR{ start-bar}\DF{\LIT{0}}\\ 28 | \kwd{:end1} \VAR{ end-foo}\DF{\NIL}\\ 29 | \kwd{:end2} \VAR{ end-bar}\DF{\NIL}}{\}})} 30 | { 31 | Return \retval{\T} if subsequences of \VAR{foo} and \VAR{bar} are 32 | equal. Obey/ignore, respectively, case. 33 | } 34 | 35 | \IT{(\xorGOO{% 36 | \FU{STRING}\Goo{\kwd{/= }\XOR\kwd{-NOT-EQUAL}}\\ 37 | \FU{STRING}\Goo{\kwd{\boldmath$>$ }\XOR\kwd{-GREATERP}}\\ 38 | \FU{STRING}\Goo{\kwd{\boldmath$>$= }\XOR\kwd{-NOT-LESSP}}\\ 39 | \FU{STRING}\Goo{\kwd{\boldmath$<$ }\XOR\kwd{-LESSP}}\\ 40 | \FU{STRING}\Goo{\kwd{\boldmath$<$= }\XOR\kwd{-NOT-GREATERP}}}{\}} 41 | \VAR{foo} \VAR{bar} 42 | \orGOO{\kwd{:start1} \VAR{ start-foo}\DF{\LIT{0}}\\ 43 | \kwd{:start2} \VAR{ start-bar}\DF{\LIT{0}}\\ 44 | \kwd{:end1} \VAR{ end-foo}\DF{\NIL}\\ 45 | \kwd{:end2} \VAR{ end-bar}\DF{\NIL}}{\}})} 46 | {\index{STRING/=}\index{STRING-NOT-EQUAL}% 47 | \index{STRING>@STRING$>$}\index{STRING-GREATERP}% 48 | \index{STRING>=@STRING$>$=}\index{STRING-NOT-LESSP}% 49 | \index{STRING<@STRING$<$}\index{STRING-LESSP}% 50 | \index{STRING<=@STRING$<$=}\index{STRING-NOT-GREATERP}% 51 | If \VAR{foo} is lexicographically not equal, greater, not less, 52 | less, or not greater, respectively, then return \retval{position} 53 | of first mismatching character in \VAR{foo}. Otherwise return 54 | \retval{\NIL}. Obey/ignore, respectively, case. 55 | } 56 | 57 | \IT{(\FU*{MAKE-STRING} \VAR{size} \orGOO{\kwd{:initial-element} \VAR{ char}\\ 58 | \kwd{:element-type} \VAR{ type}\DF{\kwd{character}}}{\}})} 59 | { 60 | Return \retval{string} of length \VAR{size}. 61 | } 62 | 63 | \IT{\arrGOO{% 64 | (\FU*{STRING} \VAR{ x})\\ 65 | (\xorGOO{% 66 | \FU*{STRING-CAPITALIZE}\\ 67 | \FU*{STRING-UPCASE}\\ 68 | \FU*{STRING-DOWNCASE}}{\}} 69 | \VAR{ x } 70 | \orGOO{\kwd{:start} \VAR{ start}\DF{\LIT{0}}\\ 71 | \kwd{:end} \VAR{ end}\DF{\NIL}}{\}})}{.}} 72 | { 73 | Convert \VAR{x} (\kwd{symbol}, \kwd{string}, or \kwd{character}) 74 | into a \retval{string}, a \retval{string with capitalized words}, 75 | an \retval{all-uppercase string}, or an \retval{all-lowercase 76 | string}, respectively. 77 | } 78 | 79 | \IT{(\xorGOO{% 80 | \FU*{NSTRING-CAPITALIZE}\\ 81 | \FU*{NSTRING-UPCASE}\\ 82 | \FU*{NSTRING-DOWNCASE}}{\}} 83 | \VAR{\DES{string}} 84 | \orGOO{\kwd{:start} \VAR{ start}\DF{\LIT{0}}\\ 85 | \kwd{:end} \VAR{ end}\DF{\NIL}}{\}})} 86 | { 87 | Convert \VAR{string} into a \retval{string with capitalized 88 | words}, an \retval{all-uppercase string}, or an 89 | \retval{all-lowercase string}, respectively. 90 | } 91 | 92 | \IT{(\xorGOO{\FU*{STRING-TRIM}\\ 93 | \FU*{STRING-LEFT-TRIM}\\ 94 | \FU*{STRING-RIGHT-TRIM}}{\}} \VAR{char-bag} \VAR{string})} 95 | { 96 | Return \retval{\VAR{string}} with all characters in sequence 97 | \VAR{char-bag} removed from both ends, from the beginning, or from 98 | the end, respectively. 99 | } 100 | 101 | \IT{\arrGOO{(\FU*{CHAR} \VAR{ string} \VAR{ i})\\ 102 | (\FU*{SCHAR} \VAR{ string} \VAR{ i})}{.}} 103 | { 104 | Return zero-indexed \retval{\VAR{i}th character} of string 105 | ignoring/obeying, respectively, fill pointer. \kwd{setf}able. 106 | } 107 | 108 | \IT{(\FU*{PARSE-INTEGER} \VAR{string} 109 | \orGOO{\kwd{:start} \VAR{ start}\DF{\LIT{0}}\\ 110 | \kwd{:end} \VAR{ end}\DF{\NIL}\\ 111 | \kwd{:radix} \VAR{ int}\DF{\LIT{10}}\\ 112 | \kwd{:junk-allowed} \VAR{ bool}\DF{\NIL}}{\}})} 113 | { 114 | Return \retval{integer} parsed from \VAR{string} and 115 | \retvalii{index} of parse end. 116 | } 117 | 118 | \end{LIST} 119 | 120 | %%% Local Variables: 121 | %%% mode: latex 122 | %%% TeX-master: "clqr" 123 | %%% End: 124 | -------------------------------------------------------------------------------- /html-template/new-pure.css: -------------------------------------------------------------------------------- 1 | /* 2 | * new-pure style sheet 3 | * 4 | * Copyright (c) 2008 Bert Burgemeister 5 | * 6 | * Permission is granted to copy, distribute and/or modify this 7 | * document under the terms of the GNU Free Documentation License, 8 | * Version 1.2; with no Invariant Sections, no Front-Cover Texts and 9 | * no Back-Cover Texts. 10 | * http://www.gnu.org/licenses/fdl.html 11 | * 12 | */ 13 | 14 | body { 15 | font-family: Verdana,Arial,Helvetica,sans-serif; 16 | font-size: small; 17 | background-color: white; 18 | color: black; 19 | max-width: 1000px; 20 | min-width: 600px; 21 | margin-left: auto; 22 | margin-right: auto; 23 | } 24 | 25 | h1 { 26 | letter-spacing: .1em; 27 | margin: .2ex; 28 | font-size: 2em; 29 | font-weight: normal; 30 | } 31 | 32 | h2 { 33 | letter-spacing: .1em; 34 | font-size: 1.5em; 35 | font-weight: normal; 36 | margin-left: .5ex; 37 | margin-right: .5ex; 38 | } 39 | 40 | h3 { 41 | letter-spacing: .3em; 42 | font-size: 1.1em; 43 | margin-top: 2.5ex; 44 | margin-bottom: 1ex; 45 | font-weight: normal; 46 | width: auto; 47 | } 48 | 49 | h4 { 50 | letter-spacing: .3em; 51 | font-size: 1em; 52 | text-align: left; 53 | font-weight: normal; 54 | margin-bottom: 3px; 55 | } 56 | 57 | h5 { 58 | letter-spacing: .1em; 59 | font-size: 1em; 60 | text-align: left; 61 | font-weight: normal; 62 | margin-top: 1.8ex; 63 | margin-bottom: .5ex; 64 | } 65 | 66 | a { 67 | color: black; 68 | text-decoration: none; 69 | } 70 | 71 | a:hover { 72 | color: #0080C0; 73 | text-decoration: none; 74 | } 75 | 76 | p { 77 | margin: 5px 0; 78 | } 79 | 80 | pre { 81 | font-size: 100%; 82 | margin-top: .7ex; 83 | margin-bottom: .7ex; 84 | margin-left: 0; 85 | padding: 0; 86 | } 87 | 88 | img { 89 | border: 0px; 90 | } 91 | 92 | .left { 93 | float: left; 94 | clear: left; 95 | margin-right: 2ex; 96 | margin-bottom: 2ex; 97 | } 98 | 99 | .right { 100 | float: right; 101 | clear: both; 102 | margin-left: 2ex; 103 | margin-bottom: 2ex; 104 | } 105 | 106 | .here { 107 | float: none; 108 | clear: both; 109 | margin-left: 2ex; 110 | margin-bottom: 2ex; 111 | } 112 | 113 | .title { 114 | letter-spacing: 1em; 115 | font-size: 1.3em; 116 | font-weight: normal; 117 | border: 1px solid gray; 118 | text-align: center; 119 | padding: .5em; 120 | width: 1000px; 121 | } 122 | 123 | .subtitle { 124 | letter-spacing: .5em; 125 | font-size: 1em; 126 | font-weight: normal; 127 | padding: .2%; 128 | border: 1px solid gray; 129 | text-align: center; 130 | } 131 | 132 | .toolbar { 133 | border: 1px solid gray; 134 | text-align: center; 135 | } 136 | 137 | .logo { 138 | padding-top: .5%; 139 | padding-bottom: .5%; 140 | float: left; 141 | clear: left; 142 | width: 22%; 143 | border: 1px solid gray; 144 | text-align: center; 145 | letter-spacing: .1em; 146 | font-size: 3em; 147 | font-weight: normal; 148 | } 149 | 150 | .main-table { 151 | border-spacing: 8px; 152 | } 153 | 154 | .content { 155 | vertical-align: top; 156 | padding-left: 1.5em; 157 | padding-right: 1.5em; 158 | padding-top: 1em; 159 | padding-bottom: 2.5em; 160 | border: 1px solid gray; 161 | text-align: justify; 162 | } 163 | 164 | .content a { 165 | color: #404040; 166 | text-decoration: none; 167 | letter-spacing: .1em; 168 | } 169 | 170 | .content a:hover { 171 | color: #0080C0; 172 | text-decoration: none; 173 | } 174 | 175 | .content ul { 176 | list-style: none; 177 | } 178 | 179 | .side-content { 180 | vertical-align: top; 181 | width: 8em; 182 | border: 1px solid gray; 183 | padding-left: 1.5em; 184 | padding-right: 1.5em; 185 | padding-top: 1.5em; 186 | padding-bottom: 2.5em; 187 | text-align: left; 188 | } 189 | 190 | .side-content a { 191 | color: #404040; 192 | text-decoration: none; 193 | letter-spacing: .1em; 194 | } 195 | 196 | .side-content a:hover { 197 | color: #0080C0; 198 | text-decoration: none; 199 | } 200 | 201 | .side-content ul { 202 | padding: 0; 203 | margin: 0; 204 | list-style: none; 205 | } 206 | 207 | .side-content li { 208 | margin: 1.2ex 0; 209 | } 210 | 211 | .side-content img { 212 | width: 8em; 213 | max-width: 124px; 214 | border: 0px; 215 | margin-top: 10ex; 216 | } 217 | 218 | .quote { 219 | text-align: justify; 220 | font-style: italic; 221 | } 222 | 223 | .quicklinks { 224 | border: 1px solid gray; 225 | vertical-align: bottom; 226 | text-align: center; 227 | } 228 | 229 | .footer { 230 | font-size: .8em; 231 | text-align: center; 232 | padding: 0em; 233 | } 234 | 235 | .footer a { 236 | color: #404040; 237 | text-decoration: none; 238 | letter-spacing: .1em; 239 | } 240 | 241 | .footer a:hover { 242 | color: #0080C0; 243 | text-decoration: none; 244 | } 245 | 246 | -------------------------------------------------------------------------------- /html-template/download.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Common Lisp Quick Reference: Download 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 31 | 134 | 135 | 136 | 139 | 140 | 141 | 147 | 148 |
16 | Common Lisp Quick Reference 17 |
21 | 30 | 32 |

Download

33 |

34 | This is revision 35 | of 36 | . 37 |

38 |

39 | If unsure what to download, have a look at printing & bookbinding. 40 |

  41 |

42 | [Sample] 44 | 45 | 46 | 50 | 51 | 52 | 56 | 57 |
47 | clqr-a4-booklet-all.pdf 49 |
53 | clqr-letter-booklet-all.pdf 55 |
58 |
    59 |
  • Suitable for printing, folding lengthwise and nesting the 60 | folios. 61 |
  • With 52 pages total, first sheet has pages 52, 1, 2, 51. 62 |
  • With 52 pages total, last sheet has pages 28, 25, 26, 27. 63 |
64 |
65 |
66 |
67 | [Sample] 69 | 70 | 71 | 75 | 76 | 77 | 81 | 82 |
72 | clqr-a4-booklet-four.pdf 74 |
78 | clqr-letter-booklet-four.pdf 80 |
83 |
    84 |
  • Suitable for printing, folding lengthwise and stacking the 85 | folios. 86 |
  • First sheet has pages 4, 1, 2, 3. 87 |
  • With 52 pages total, last sheet has pages 52, 49, 50, 51. 88 |
89 |
90 |
91 |
92 | [Sample] 94 | 95 | 96 | 100 | 101 | 102 | 106 | 107 |
97 | clqr-a4-consec.pdf 99 |
103 | clqr-letter-consec.pdf 105 |
108 |
    109 |
  • Pages in their natural order. 110 |
  • Suitable only for reading on the screen. Comes 111 | with bookmarks and hyperlinks. 112 |
  • Not meant for printing because of the odd 113 | paper format and the coloured hyperlinks. 114 |
115 |
116 |
117 |
118 | [Sample] 120 | 121 | 122 | 126 | 127 |
123 | clqr.tar.gz 125 |
128 |
    129 |
  • LaTeX source. 130 |
  • Not of much use unless you want to change it. 131 |
132 |
133 |
149 | 150 | 155 | 157 | 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /clqr-arrays.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2018 2 | % Bert Burgemeister 3 | % 4 | % Permission is granted to copy, distribute and/or modify this 5 | % document under the terms of the GNU Free Documentation License, 6 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 7 | % no Back-Cover Texts. For details see file COPYING. 8 | % 9 | 10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 11 | \section{Arrays} 12 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 | \label{section:Arrays} 14 | 15 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 | \subsection{Predicates} 17 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 | \begin{LIST}{1cm} 19 | 20 | \IT{\arrGOO{% 21 | (\FU*{ARRAYP} \VAR{ foo})\\ 22 | (\FU*{VECTORP} \VAR{ foo})\\ 23 | (\FU*{SIMPLE-VECTOR-P} \VAR{ foo})\\ 24 | (\FU*{BIT-VECTOR-P} \VAR{ foo})\\ 25 | (\FU*{SIMPLE-BIT-VECTOR-P} \VAR{ foo})}{.}} 26 | { 27 | \retval{\T} if \VAR{foo} is of indicated type. 28 | } 29 | 30 | \IT{\arrGOO{(\FU*{ADJUSTABLE-ARRAY-P} \VAR{ array})\\ 31 | (\FU*{ARRAY-HAS-FILL-POINTER-P} \VAR{ array})}{.}} 32 | { 33 | \retval{\T} if \VAR{array} is adjustable/has a fill pointer, 34 | respectively. 35 | } 36 | 37 | \IT{(\FU*{ARRAY-IN-BOUNDS-P} \VAR{array} \Op{\VAR{subscripts}})} 38 | { 39 | Return \retval{\T} if \VAR{subscripts} are in \VAR{array}'s bounds. 40 | } 41 | % No default subscripts in standard. 42 | 43 | \end{LIST} 44 | 45 | 46 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 47 | \subsection{Array Functions} 48 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 49 | \begin{LIST}{1cm} 50 | 51 | \IT{(\xorGOO{% 52 | \FU*{MAKE-ARRAY}\VAR{ dimension-sizes } 53 | \OP{\kwd{:adjustable} \VAR{ bool}\DF{\NIL}}\\ 54 | \FU*{ADJUST-ARRAY } \DES{\VAR{array}} 55 | \VAR{ dimension-sizes}}{\}} 56 | \orGOO{\kwd{:element-type} \VAR{ type}\DF{\T}\\ 57 | \kwd{:fill-pointer } \Goo{\VAR{num}\XOR\VAR{bool}}\DF{\NIL}\\ 58 | \xorGOO{\kwd{:initial-element} \VAR{ obj}\\ 59 | \kwd{:initial-contents} \VAR{ tree-or-array}\\ 60 | \kwd{:displaced-to } \VAR{array}\DF{\NIL}\text{ } 61 | \Op{\kwd{:displaced-index-offset } \VAR{i}\DF{\LIT{0}}}}{.}}{\}})} 62 | { 63 | Return fresh, or readjust, respectively, \retval{vector} or \retval{array}. 64 | } 65 | 66 | \IT{(\FU*{AREF} \VAR{array} \OP{\VAR{subscripts}})} 67 | { 68 | Return 69 | \retval{array element} pointed to by \VAR{subscripts}. \kwd{setf}able. 70 | } 71 | % No subscripts means sole element of rank zero array. 72 | 73 | \IT{(\FU*{ROW-MAJOR-AREF} \VAR{array} \VAR{i})} 74 | { 75 | Return \retval{\VAR{i}th element} of \VAR{array} in row-major 76 | order. \kwd{setf}able. 77 | } 78 | 79 | \IT{(\FU*{ARRAY-ROW-MAJOR-INDEX} \VAR{array} \Op{\VAR{subscripts}})} 80 | { 81 | \retval{Index} in row-major order of the element denoted by \VAR{subscripts}. 82 | } 83 | 84 | \IT{(\FU*{ARRAY-DIMENSIONS} \VAR{array})} 85 | { 86 | \retval{List} containing the lengths of \VAR{array}'s dimensions. 87 | } 88 | 89 | \IT{(\FU*{ARRAY-DIMENSION} \VAR{array} \VAR{i})} 90 | { 91 | \retval{Length of \VAR{i}th dimension} of \VAR{array}. 92 | } 93 | 94 | \IT{(\FU*{ARRAY-TOTAL-SIZE} \VAR{array})} 95 | { 96 | \retval{Number of elements} in \VAR{array}. 97 | } 98 | 99 | \IT{(\FU*{ARRAY-RANK} \VAR{array})} 100 | { 101 | \retval{Number of dimensions} of \VAR{array}. 102 | } 103 | 104 | \IT{(\FU*{ARRAY-DISPLACEMENT} \VAR{array})} 105 | { 106 | \retval{Target array} and \retvalii{offset}. 107 | } 108 | 109 | \IT{\arrGOO{(\FU*{BIT} \VAR{ bit-array } \Op{\VAR{subscripts}})\\ 110 | (\FU*{SBIT} \VAR{ simple-bit-array } \Op{\VAR{subscripts}})}{.}} 111 | { 112 | Return \retval{element} of \VAR{bit-array} or of 113 | \VAR{simple-bit-array}. \kwd{setf}\-able. 114 | } 115 | 116 | \IT{(\FU*{BIT-NOT} \DES{\VAR{bit-array}} \Op{\DES{\VAR{result-bit-array}}\DF{\NIL}})} 117 | { 118 | Return \retval{result} of bitwise negation of \VAR{bit-array}. If \VAR{result-bit-array} is \T, put 119 | result in \VAR{bit-array}; if it is \NIL, make a new array for 120 | result. 121 | } 122 | 123 | \IT{(\xorGOO{% 124 | \FU*{BIT-EQV}\\ 125 | \FU*{BIT-AND}\\ 126 | \FU*{BIT-ANDC1}\\ 127 | \FU*{BIT-ANDC2}\\ 128 | \FU*{BIT-NAND}\\ 129 | \FU*{BIT-IOR}\\ 130 | \FU*{BIT-ORC1}\\ 131 | \FU*{BIT-ORC2}\\ 132 | \FU*{BIT-XOR}\\ 133 | \FU*{BIT-NOR}}{\}} \DES{\VAR{bit-array-a}} \VAR{bit-array-b} 134 | \Op{\DES{\VAR{result-bit-array}}\DF{\NIL}})} 135 | { 136 | Return \retval{result} of bitwise logical operations 137 | (cf.\ operations of \FU{boole}, page \pageref{section:Logic Functions}) on 138 | \VAR{bit-array-a} and \VAR{bit-array-b}. If \VAR{result-bit-array} is \T, put result in 139 | \VAR{bit-array-a}; if it is \NIL, make a new array for 140 | result. 141 | } 142 | 143 | \IT{\CNS*{ARRAY-RANK-LIMIT}} 144 | { 145 | Upper bound of array rank; $\geq 8$. 146 | } 147 | 148 | \IT{\CNS*{ARRAY-DIMENSION-LIMIT}} 149 | { 150 | Upper bound of an array dimension; $\geq 1024$. 151 | } 152 | 153 | \IT{\CNS*{ARRAY-TOTAL-SIZE-LIMIT}} 154 | { 155 | Upper bound of array size; $\geq 1024$. 156 | } 157 | 158 | \end{LIST} 159 | 160 | 161 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 162 | \subsection{Vector Functions} 163 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 164 | 165 | Vectors can as well be manipulated by sequence functions; see 166 | section~\ref{section:Sequences}. 167 | 168 | \begin{LIST}{1cm} 169 | 170 | \IT{(\FU*{VECTOR} \OPn{\VAR{foo}})} 171 | { 172 | Return fresh \retval{simple vector of \VAR{foo}s}. 173 | } 174 | % No default foo in standard. 175 | 176 | \IT{(\FU*{SVREF} \VAR{vector} \VAR{i})} 177 | { 178 | \retval{Element \VAR{i}} of simple \VAR{vector}. \kwd{setf}able. 179 | } 180 | 181 | \IT{(\FU*{VECTOR-PUSH} \VAR{foo} \DES{\VAR{vector}})} 182 | { 183 | Return \retval{\NIL} if \VAR{vector}'s fill pointer equals size of 184 | \VAR{vector}. Otherwise replace element of \VAR{vector} pointed to 185 | by \retval{fill pointer} with \VAR{foo}; then increment fill 186 | pointer. 187 | } 188 | 189 | \IT{(\FU*{VECTOR-PUSH-EXTEND} \VAR{foo} \DES{\VAR{vector}} 190 | \Op{\VAR{num}})} 191 | { 192 | Replace element of \VAR{vector} pointed to by \retval{fill pointer} with 193 | \VAR{foo}, then increment fill pointer. Extend \VAR{vector}'s size by 194 | $\ge \VAR{num}$ if necessary. 195 | } 196 | 197 | \IT{(\FU*{VECTOR-POP} \DES{\VAR{vector}})} 198 | { 199 | Return \retval{element of \VAR{vector}} its fillpointer points to 200 | after decrementation. 201 | } 202 | 203 | \IT{(\FU*{FILL-POINTER} \VAR{vector})} 204 | { 205 | \retval{Fill pointer} of \VAR{vector}. \kwd{setf}able. 206 | } 207 | 208 | \end{LIST} 209 | 210 | 211 | 212 | %%% Local Variables: 213 | %%% mode: latex 214 | %%% TeX-master: "clqr" 215 | %%% End: 216 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014 Bert Burgemeister 2 | # 3 | # Permission is granted to copy, distribute and/or modify this 4 | # document under the terms of the GNU Free Documentation License, 5 | # Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | # no Back-Cover Texts. For details see file COPYING. 7 | 8 | SEND-TO-LOG = | tee -a lastbuild.log 9 | 10 | LATEX = latex 11 | MAKEINDEX = makeindex -c 12 | MPOST = TEX=latex mpost 13 | DVIPS = dvips 14 | PSNUP-A4 = psnup -W10.5cm -H29.7cm -pa4 -2 15 | PSNUP-LETTER = psnup -W4.25in -H11in -pletter -2 16 | PSBOOK-ALL = psbook 17 | PSBOOK-FOUR = psbook -s4 18 | PS2PDF = ps2pdf -dPDFSETTINGS=/prepress 19 | CONVERT = convert 20 | MONTAGE = montage 21 | HEAD = head 22 | TAIL = tail 23 | TOUCH = touch 24 | CP = cp -v 25 | RM = rm -f -v 26 | MV = mv -f -v 27 | # trying to find GNU Make 28 | MAKE = `which gmake || which make` 29 | GZIP = gzip 30 | GIT_REVISION = git describe | sed 's/\(.*-.*\)-.*/\1/' 31 | GIT_ARCHIVE = git archive --format=tar --prefix=clqr/ HEAD | $(GZIP) 32 | GIT_LOG = git log 33 | DATE = git log HEAD^..HEAD --date=short | awk '/Date:/{print $$2}' | tr -d '\n\\' 34 | 35 | all: letter a4 36 | 37 | letter: 38 | $(MAKE) letter-booklets 39 | $(MAKE) clqr-letter-consec.pdf 40 | 41 | a4: 42 | $(MAKE) a4-booklets 43 | $(MAKE) clqr-a4-consec.pdf 44 | 45 | letter-booklets: clqr-letter-booklet-all.pdf clqr-letter-booklet-four.pdf 46 | 47 | a4-booklets: clqr-a4-booklet-all.pdf clqr-a4-booklet-four.pdf 48 | 49 | clqr-letter-consec.pdf: clqr-letter-consec.ps 50 | $(PS2PDF) $< $@ $(SEND-TO-LOG) 51 | 52 | clqr-a4-consec.pdf: clqr-a4-consec.ps 53 | $(PS2PDF) $< $@ $(SEND-TO-LOG) 54 | 55 | clqr-letter-booklet-%.pdf: clqr-letter-booklet-%.ps paper-letter.flag 56 | $(PS2PDF) -sPAPERSIZE=letter $< $@ $(SEND-TO-LOG) 57 | 58 | clqr-a4-booklet-%.pdf: clqr-a4-booklet-%.ps paper-a4.flag 59 | $(PS2PDF) -sPAPERSIZE=a4 $< $@ $(SEND-TO-LOG) 60 | 61 | clqr-letter-booklet-%.ps: clqr-letter-signature-%.ps 62 | $(PSNUP-LETTER) $< > $@ $(SEND-TO-LOG) 63 | 64 | clqr-a4-booklet-%.ps: clqr-a4-signature-%.ps 65 | $(PSNUP-A4) $< > $@ $(SEND-TO-LOG) 66 | 67 | clqr-%-signature-all.ps: clqr-%-consec-black.ps 68 | $(PSBOOK-ALL) $< $@ $(SEND-TO-LOG) 69 | 70 | clqr-%-signature-four.ps: clqr-%-consec-black.ps 71 | $(PSBOOK-FOUR) $< $@ $(SEND-TO-LOG) 72 | 73 | clqr-%-consec.ps: clqr-%-colorful.dvi 74 | $(DVIPS) -o $@ $< $(SEND-TO-LOG) 75 | 76 | clqr-%-consec-black.ps: clqr-%-black.dvi 77 | $(DVIPS) -o $@ $< $(SEND-TO-LOG) 78 | 79 | clqr-%-colorful.dvi: clqr.tex clqr-*.tex clqr.*.tex clqr-types-and-classes.1 paper-%.flag revision-number color-colorful.flag 80 | $(TOUCH) clqr.ind $(SEND-TO-LOG) 81 | $(LATEX) clqr.tex $(SEND-TO-LOG) 82 | $(LATEX) clqr.tex $(SEND-TO-LOG) 83 | $(MAKEINDEX) -s clqr.ist clqr.idx $(SEND-TO-LOG) 84 | $(LATEX) clqr.tex $(SEND-TO-LOG) 85 | $(MV) clqr.dvi $@ $(SEND-TO-LOG) 86 | 87 | clqr-%-black.dvi: clqr.tex clqr-*.tex clqr.*.tex clqr-types-and-classes.1 paper-%.flag revision-number color-black.flag 88 | $(TOUCH) clqr.ind $(SEND-TO-LOG) 89 | $(LATEX) clqr.tex $(SEND-TO-LOG) 90 | $(LATEX) clqr.tex $(SEND-TO-LOG) 91 | $(MAKEINDEX) -s clqr.ist clqr.idx $(SEND-TO-LOG) 92 | $(LATEX) clqr.tex $(SEND-TO-LOG) 93 | $(MV) clqr.dvi $@ $(SEND-TO-LOG) 94 | 95 | clqr-types-and-classes.1 clqr-types-and-classes.2 \ 96 | clqr-types-and-classes.3 clqr-types-and-classes.4 \ 97 | clqr-types-and-classes.5: clqr-types-and-classes.mp clqr.macros.tex clqr.packages.tex 98 | $(MPOST) $< $(SEND-TO-LOG) 99 | 100 | paper-a4.flag: 101 | $(CP) paper-a4.tex paper-current.tex $(SEND-TO-LOG) 102 | $(RM) paper-letter.flag $(SEND-TO-LOG) 103 | $(TOUCH) $@ 104 | 105 | paper-letter.flag: 106 | $(CP) paper-letter.tex paper-current.tex $(SEND-TO-LOG) 107 | $(RM) paper-a4.flag $(SEND-TO-LOG) 108 | $(TOUCH) $@ 109 | 110 | color-colorful.flag: 111 | $(CP) color-colorful.tex color-current.tex $(SEND-TO-LOG) 112 | $(RM) color-black.flag $(SEND-TO-LOG) 113 | $(TOUCH) $@ 114 | 115 | color-black.flag: 116 | $(CP) color-black.tex color-current.tex $(SEND-TO-LOG) 117 | $(RM) color-colorful.flag $(SEND-TO-LOG) 118 | $(TOUCH) $@ 119 | 120 | revision-number: 121 | $(GIT_REVISION) | tee REVISION.tex > release-revision.txt 122 | $(DATE) | tee DATE.tex > release-date.txt 123 | 124 | clean: 125 | $(RM) *.dvi *.toc *.aux *.log *.idx *.ilg *.ind *.out *.ps *.pdf *~ \ 126 | *.flag *.jpg *.jpg *.tar.gz REVISION.tex DATE.tex \ 127 | latest-changes.html release-revision.txt release-date.txt \ 128 | *.[12345] *.mpx mpxerr.tex paper-current.tex color-current.tex 129 | $(RM) -r gh-pages 130 | 131 | 132 | # Project hosting, Github 133 | 134 | sample-frontcover.jpg: clqr-a4-consec.pdf 135 | $(CONVERT) $<'[0]' -verbose -background white -alpha remove -alpha off -resize 40% temp.jpg $(SEND-TO-LOG) 136 | $(MONTAGE) temp.jpg -tile 1x1 -geometry +1+1 -background gray $@ $(SEND-TO-LOG) 137 | $(RM) temp.jpg 138 | 139 | sample-firstpage-%.jpg: clqr-a4-booklet-%.pdf 140 | $(CONVERT) $<'[0]' -verbose -background white -alpha remove -alpha off -resize 15% temp.jpg $(SEND-TO-LOG) 141 | $(MONTAGE) temp.jpg -tile 1x1 -geometry +1+1 -background gray $@ $(SEND-TO-LOG) 142 | $(RM) temp.jpg 143 | 144 | sample-firstpage-consec.jpg: clqr-a4-consec.pdf 145 | $(CONVERT) $<'[0]' -verbose -background white -alpha remove -alpha off -resize 15% temp.jpg $(SEND-TO-LOG) 146 | $(MONTAGE) temp.jpg -tile 1x1 -geometry +1+1 -background gray $@ $(SEND-TO-LOG) 147 | $(RM) temp.jpg 148 | 149 | sample-source.jpg: clqr-numbers.tex 150 | $(HEAD) -n 59 $< | $(TAIL) -n 40 | $(CONVERT) -font Courier -crop 120x80+30+2 +repage label:@- temp.jpg $(SEND-TO-LOG) 151 | $(MONTAGE) temp.jpg -tile 1x1 -geometry +1+1 -background gray $@ $(SEND-TO-LOG) 152 | $(RM) temp.jpg 153 | 154 | latest-changes.html: clqr.tex clqr-*.tex 155 | if $(GIT_LOG) -5 --pretty=format:"

%ci%n
%s%n
%b

" > $@; then true; else true; fi $(SEND-TO-LOG) 156 | 157 | gh-publish: 158 | $(RM) -r gh-pages 159 | mkdir gh-pages 160 | $(MAKE) all 161 | $(CP) clqr-a4-consec.pdf gh-pages/ 162 | $(CP) clqr-letter-consec.pdf gh-pages/ 163 | $(CP) clqr-a4-booklet-all.pdf gh-pages/ 164 | $(CP) clqr-a4-booklet-four.pdf gh-pages/ 165 | $(CP) clqr-letter-booklet-all.pdf gh-pages/ 166 | $(CP) clqr-letter-booklet-four.pdf gh-pages/ 167 | $(MAKE) gh-pages/sample-frontcover.jpg \ 168 | gh-pages/sample-firstpage-all.jpg \ 169 | gh-pages/sample-firstpage-four.jpg \ 170 | gh-pages/sample-firstpage-consec.jpg \ 171 | gh-pages/sample-source.jpg \ 172 | gh-pages/clqr.tar.gz \ 173 | gh-pages/404.html \ 174 | gh-pages/CNAME \ 175 | gh-pages/README \ 176 | gh-pages/download.html \ 177 | gh-pages/favicon.ico \ 178 | gh-pages/index.html \ 179 | gh-pages/license.html \ 180 | gh-pages/new-pure.css \ 181 | gh-pages/printing.html \ 182 | gh-pages/robots.txt \ 183 | gh-pages/source.html 184 | cd gh-pages; git init; git add ./; git commit -a -m "gh-pages pseudo commit"; git push git@github.com:trebb/clqr.git +master:gh-pages 185 | 186 | gh-pages/sample-%.jpg: sample-%.jpg 187 | $(CP) $< $@ 188 | 189 | gh-pages/index.html: html-template/index.html latest-changes.html 190 | sed -e "/

Latest Changes<\/h3>/ r latest-changes.html" html-template/index.html > $@ 191 | 192 | gh-pages/download.html: html-template/download.html revision-number 193 | sed -e "/This is revision/ r REVISION.tex" -e "// r DATE.tex" html-template/download.html > $@ 194 | 195 | gh-pages/%.tar.gz: %.tar.gz 196 | $(CP) $< $@ 197 | 198 | gh-pages/%: html-template/% 199 | $(CP) $< $@ 200 | 201 | clqr.tar.gz: clqr.tex clqr-*.tex 202 | if $(GIT_ARCHIVE) > clqr.tar.gz; then true; else true; fi $(SEND-TO-LOG) 203 | -------------------------------------------------------------------------------- /clqr.macros.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2011, 2014, 2018 Bert Burgemeister 2 | % 3 | % Permission is granted to copy, distribute and/or modify this 4 | % document under the terms of the GNU Free Documentation License, 5 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 6 | % no Back-Cover Texts. For details see file COPYING. 7 | % 8 | \newlength{\LISTlinewidth} 9 | \newenvironment{LIST}[1]% 10 | {% 11 | \LISTlinewidth=\linewidth% 12 | \begin{flushleft}% 13 | \begin{list}{}% 14 | {\setlength{\itemindent}{-#1}\setlength{\leftmargin}{#1}}% 15 | %\parskip0pt\itemsep0pt% 16 | }% 17 | {\end{list}% 18 | \end{flushleft}% 19 | }% 20 | % 21 | %\renewcommand{\topfraction}{1} 22 | \renewcommand{\bottomfraction}{1} 23 | %\renewcommand*{\figureformat}{} 24 | %\renewcommand*{\captionformat}{} 25 | \renewcommand{\thefootnote}{\fnsymbol{footnote}} 26 | % 27 | \setlength{\parfillskip}{5cm plus1cm minus3cm} 28 | \setlength{\arraycolsep}{0pt} 29 | % 30 | % 31 | \def\startexplanation{$\triangleright$\hskip1.4ex} 32 | \newlength{\ITwidth} 33 | \newlength{\ITrest} 34 | \newlength{\ITtab}\ITtab=3em 35 | % 36 | \def\IT#1 #2 {% 37 | \settowidth{\ITwidth}{#1\unskip\hskip1em\hskip\ITtab}% 38 | \ITrest=\LISTlinewidth\advance\ITrest by -\ITwidth% 39 | \loop\ifdim\ITrest > \ITtab% 40 | \advance\ITrest by -\ITtab% 41 | \repeat% 42 | % 43 | \settowidth{\ITwidth}{% 44 | #1\unskip\hskip1em\hskip\ITrest% 45 | \startexplanation#2% 46 | }% 47 | \item{}% 48 | \ifdim\ITwidth < \LISTlinewidth% Entry fits into a single line 49 | #1\unskip\hskip1em\hskip\ITrest% 50 | \startexplanation#2% 51 | \else% 52 | #1% 53 | \unskip\penalty-10000% 54 | \parbox[t]{\linewidth}{\startexplanation#2}% 55 | \fi% 56 | } 57 | % 58 | % Emphasize 59 | \newcommand{\EM}[1]{% 60 | \text{{\fontfamily{cmr}\fontseries{b}\fontshape{n}\selectfont#1}}} 61 | % 62 | % 63 | % Literal Text 64 | \newcommand{\LIT}[1]{\text{{\fontfamily{cmtt}\selectfont#1}}} 65 | % 66 | % Variable Text 67 | \newcommand{\VAR}[1]{\text{{\fontfamily{cmr}\fontshape{it}\selectfont#1\/}}} 68 | % 69 | % Not Evaluated 70 | \newcommand{\NEV}[1]{\text{{$\widehat{#1}$}}} 71 | % 72 | % Subjected to Destruction 73 | \newcommand{\DES}[1]{\text{{$\widetilde{#1}$}}} 74 | % 75 | % Default Value 76 | \newcommand{\DF}[1]{% 77 | \text{\textsubscript{% 78 | \setlength{\fboxsep}{.5pt}\setlength{\fboxrule}{.2bp}\fbox{#1}}}} 79 | % 80 | % Optional Part, [], two sizes 81 | \newcommand{\OP}[1]{{\text{$\big[$}{#1}\text{$\big]$}}} 82 | \newcommand{\Op}[1]{{\text{$[$}{#1}\text{$]$}}} 83 | % 84 | % Or, | 85 | \newcommand{\XOR}{\hspace{1pt}\text{\rule[-.9ex]{.25pt}{3ex}}\hspace{1pt}} 86 | %\newcommand{\XOR}{\text{$\mid$}\hspace{0pt}} 87 | % 88 | % Optional Parts, * 89 | \newcommand{\OPn}[1]{{{#1}\text{${}^{*}$}}} 90 | % 91 | % Required Parts, + 92 | \newcommand{\RP}[1]{{{#1}\text{${}^{+}$}}} 93 | % 94 | % Implicit PROGN, P* 95 | \newcommand{\PROGN}[1]{% 96 | {{#1}\text{${}^{% 97 | {\raisebox{.5ex}[0pt][0pt]{\tiny\sffamily\mdseries\makebox[0pt][l]{\hspace{-.6ex}P}}*}}$}}} 98 | % 99 | % Group of Objects {}, three sizes 100 | \newcommand{\GOO}[1]{{\text{$\Big\{$}{#1}\text{$\Big\}$}}} 101 | \newcommand{\GOo}[1]{{\text{$\big\{$}{#1}\text{$\big\}$}}} 102 | \newcommand{\Goo}[1]{{\text{$\{$}{#1}\text{$\}$}}} 103 | % Optional Group of Objects, {}*, three sizes 104 | \newcommand{\GOOs}[1]{{$\Big\{${#1}$\Big\}^{\!\!*}$}} % this one can 105 | % have line breaks 106 | \newcommand{\GOos}[1]{\text{{$\big\{${#1}$\big\}^{\!\!*}$}}} 107 | \newcommand{\Goos}[1]{\text{{$\{${#1}$\}^{\!*}$}}} 108 | % Required Group of Objects, {}+, three sizes 109 | \newcommand{\GOOp}[1]{{\text{$\Big\{$}{#1}\text{$\Big\}^{\!\!+}$}}} 110 | \newcommand{\GOop}[1]{{\text{$\big\{$}{#1}\text{$\big\}^{\!\!+}$}}} 111 | \newcommand{\Goop}[1]{{\text{$\{$}{#1}\text{$\}^{\!+}$}}} 112 | % 113 | % Vertically Arranged Group of Alternatives, { 114 | % usage: \xorGOO{line1\\ line2...}{closing delimiter} 115 | \newcommand{\xorGOO}[2]{\text{\(% 116 | \left\{\!% 117 | \begin{array}{l}% 118 | #1% 119 | \end{array}\!% 120 | \right#2% 121 | \)}} 122 | % 123 | % Vertically Arranged Group of Optional Objects, {| 124 | % usage: \orGOO{line1\\line2}{closing delimiter} 125 | \newcommand{\orGOO}[2]{\text{\(% 126 | \left\{\!\left|% 127 | \begin{array}{l}% 128 | #1% 129 | \end{array}\!% 130 | \right.\right#2% 131 | \)}} 132 | % 133 | % Vertically Arranged Group of Objects, No Opening { 134 | % usage: \arrGOO{line1\\line2}{closing delimiter} 135 | \newcommand{\arrGOO}[2]{\text{\(\!% 136 | \left.% 137 | \begin{array}{l}% 138 | #1% 139 | \end{array}\!% 140 | \right#2% 141 | \)}} 142 | % 143 | % 144 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 145 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 146 | % All sorts of tags attached to lisp keywords 147 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 149 | % 150 | \newcommand{\MARKNAME}[2]{% 151 | \text{\textsubscript{\sffamily\slshape\mdseries\lowercase{#2}}% 152 | {\sffamily\bfseries\selectfont\lowercase{#1}}}} 153 | % 154 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 155 | % Generic Keyword, Lowercase 156 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 157 | \newcommand{\kwd}[1]{\text{{\sffamily\bfseries\selectfont% 158 | \lowercase{#1}}}} 159 | % 160 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 161 | % Generic Keyword, Uppercase 162 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 163 | \newcommand{\KWD}[1]{\text{{\sffamily\bfseries\selectfont% 164 | \uppercase{#1}}}} 165 | % 166 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 167 | % Macro 168 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 169 | \newcommand{\MC}[1]{% 170 | \MARKNAME{#1}{m}} 171 | % 172 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 173 | % Special Operator 174 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 175 | \newcommand{\SO}[1]{% 176 | \MARKNAME{#1}{s}} 177 | % 178 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 179 | % Function 180 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 181 | \newcommand{\FU}[1]{% 182 | \MARKNAME{#1}{f\/}} 183 | % 184 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 185 | % Generic Function 186 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 187 | \newcommand{\GFU}[1]{% 188 | \MARKNAME{#1}{g}} 189 | % 190 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 191 | % Variable 192 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 193 | \newcommand{\V}[1]{% 194 | \MARKNAME{#1}{v}} 195 | % 196 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 197 | % Constant 198 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 199 | \newcommand{\CNS}[1]{% 200 | \MARKNAME{#1}{c}} 201 | % 202 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 203 | % Loop Keyword 204 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 205 | \newcommand{\LKWD}[1]{\text{{\sffamily\bfseries\selectfont\lowercase{#1}}}} 206 | % 207 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 208 | % Return Values, First, nth, Second, Third 209 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 210 | \renewcommand{\ULthickness}{.2pt} 211 | \newcommand{\retval}[1]{\uline{#1}} 212 | \newcommand{\retvaln}[2]{{% 213 | {\raisebox{-1.7ex}[0pt][1.4ex]{\tiny\sffamily\upshape\mdseries\makebox[0pt][l]{\hspace{-.1em}#1}}\uline{#2}}}} 214 | \newcommand{\retvalii}[1]{\retvaln{2}{#1}} 215 | \newcommand{\retvaliii}[1]{\retvaln{3}{#1}} 216 | % 217 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 218 | % T and NIL 219 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 220 | \newcommand{\T}{\text{\ttfamily T}} 221 | \newcommand{\NIL}{\text{\ttfamily NIL}} 222 | % 223 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 224 | % ~ (slightly lowered) 225 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 226 | \newcommand{\TLD}{{\protect\raisebox{-.8ex}{\textasciitilde}}} 227 | % 228 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 229 | % * (lowered version) 230 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 231 | \newcommand{\A}{\textasteriskcentered} 232 | % 233 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 234 | % Starred commands send their argument into index: 235 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 236 | \WithSuffix\newcommand\kwd*[1]{\kwd{#1}\uppercase{\index{#1}}} 237 | \WithSuffix\newcommand\KWD*[1]{\KWD{#1}\uppercase{\index{#1}}} 238 | \WithSuffix\newcommand\MC*[1]{\MC{#1}\uppercase{\index{#1}}} 239 | \WithSuffix\newcommand\SO*[1]{\SO{#1}\uppercase{\index{#1}}} 240 | \WithSuffix\newcommand\FU*[1]{\FU{#1}\uppercase{\index{#1}}} 241 | \WithSuffix\newcommand\GFU*[1]{\GFU{#1}\uppercase{\index{#1}}} 242 | \WithSuffix\newcommand\V*[1]{\V{#1}\uppercase{\index{#1}}} 243 | \WithSuffix\newcommand\CNS*[1]{\CNS{#1}\uppercase{\index{#1}}} 244 | \WithSuffix\newcommand\LKWD*[1]{\LKWD{#1}\uppercase{\index{#1}}} 245 | 246 | \hyphenation{white-space pa-ra-me-ters} 247 | 248 | %%% Local Variables: 249 | %%% mode: latex 250 | %%% TeX-master: "clqr" 251 | %%% End: 252 | -------------------------------------------------------------------------------- /clqr-types-and-classes.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2018 2 | % Bert Burgemeister 3 | % 4 | % Permission is granted to copy, distribute and/or modify this 5 | % document under the terms of the GNU Free Documentation License, 6 | % Version 1.2 or any later version published by the Free Software 7 | % Foundation; with no Invariant Sections, no Front-Cover Texts and 8 | % no Back-Cover Texts. For details see file COPYING. 9 | % 10 | 11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 | \section{Types and Classes} 13 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 14 | 15 | \begin{figure} 16 | \begin{center} 17 | \begin{sideways} 18 | \includegraphics{clqr-types-and-classes.1} 19 | \end{sideways} 20 | \end{center} 21 | \caption[]{Precedence Order of System Classes 22 | (\includegraphics{clqr-types-and-classes.3}), 23 | Classes (\includegraphics{clqr-types-and-classes.4}), 24 | Types (\includegraphics{clqr-types-and-classes.2}), and 25 | Condition Types 26 | (\includegraphics{clqr-types-and-classes.5}).\\ 27 | Every type is also a supertype of \NIL, the empty type. 28 | \label{data-types}% 29 | % 30 | \index{*@\A}% 31 | \index{T}% 32 | \index{ATOM}% 33 | \index{READTABLE}% 34 | \index{PACKAGE}% 35 | \index{SYMBOL}% 36 | \index{KEYWORD}% 37 | \index{BOOLEAN}% 38 | \index{RESTART}% 39 | \index{RANDOM-STATE}% 40 | \index{HASH-TABLE}% 41 | \index{STRUCTURE-OBJECT}% 42 | \index{STANDARD-OBJECT}% 43 | \index{NULL}% 44 | \index{CLASS}% 45 | \index{BUILT-IN-CLASS}% 46 | \index{STANDARD-CLASS}% 47 | \index{STRUCTURE-CLASS}% 48 | \index{METHOD}% 49 | \index{STANDARD-METHOD}% 50 | \index{METHOD-COMBINATION}% 51 | \index{CHARACTER}% 52 | \index{FUNCTION}% 53 | \index{COMPILED-FUNCTION}% 54 | \index{GENERIC-FUNCTION}% 55 | \index{STANDARD-GENERIC-FUNCTION}% 56 | \index{PATHNAME}% 57 | \index{LOGICAL-PATHNAME}% 58 | \index{NUMBER}% 59 | \index{COMPLEX}% 60 | \index{REAL}% 61 | \index{FLOAT}% 62 | \index{SHORT-FLOAT}% 63 | \index{SINGLE-FLOAT}% 64 | \index{DOUBLE-FLOAT}% 65 | \index{LONG-FLOAT}% 66 | \index{RATIONAL}% 67 | \index{INTEGER}% 68 | \index{RATIO}% 69 | \index{SIGNED-BYTE}% 70 | \index{FIXNUM}% 71 | \index{BIGNUM}% 72 | \index{UNSIGNED-BYTE}% 73 | \index{BIT}% 74 | \index{LIST}% 75 | \index{SEQUENCE}% 76 | \index{CONS}% 77 | \index{ARRAY}% 78 | \index{SIMPLE-ARRAY}% 79 | \index{VECTOR}% 80 | \index{STRING}% 81 | \index{SIMPLE-STRING}% 82 | \index{BASE-STRING}% 83 | \index{SIMPLE-BASE-STRING}% 84 | \index{SIMPLE-VECTOR}% 85 | \index{BIT-VECTOR}% 86 | \index{SIMPLE-BIT-VECTOR}% 87 | \index{STREAM}% 88 | \index{FILE-STREAM}% 89 | \index{TWO-WAY-STREAM}% 90 | \index{SYNONYM-STREAM}% 91 | \index{STRING-STREAM}% 92 | \index{BROADCAST-STREAM}% 93 | \index{CONCATENATED-STREAM}% 94 | \index{ECHO-STREAM}% 95 | \index{EXTENDED-CHAR}% 96 | \index{BASE-CHAR}% 97 | \index{STANDARD-CHAR}% 98 | \index{CONDITION}% 99 | \index{SERIOUS-CONDITION}% 100 | \index{STORAGE-CONDITION}% 101 | \index{SIMPLE-TYPE-ERROR}% 102 | \index{TYPE-ERROR}% 103 | \index{ERROR}% 104 | \index{PROGRAM-ERROR}% 105 | \index{CONTROL-ERROR}% 106 | \index{PACKAGE-ERROR}% 107 | \index{PRINT-NOT-READABLE}% 108 | \index{STREAM-ERROR}% 109 | \index{PARSE-ERROR}% 110 | \index{CELL-ERROR}% 111 | \index{FILE-ERROR}% 112 | \index{ARITHMETIC-ERROR}% 113 | \index{SIMPLE-CONDITION}% 114 | \index{WARNING}% 115 | \index{STYLE-WARNING}% 116 | \index{SIMPLE-ERROR}% 117 | \index{SIMPLE-WARNING}% 118 | \index{UNDEFINED-FUNCTION}% 119 | \index{UNBOUND-VARIABLE}% 120 | \index{UNBOUND-SLOT}% 121 | \index{END-OF-FILE}% 122 | \index{READER-ERROR}% 123 | \index{DIVISION-BY-ZERO}% 124 | \index{FLOATING-POINT-INEXACT}% 125 | \index{FLOATING-POINT-OVERFLOW}% 126 | \index{FLOATING-POINT-UNDERFLOW}% 127 | \index{FLOATING-POINT-INVALID-OPERATION}% 128 | } 129 | \end{figure} 130 | 131 | For any class, there is always a corresponding type of the same name. 132 | 133 | \begin{LIST}{1cm} 134 | 135 | \IT{(\FU*{TYPEP} \VAR{foo} \VAR{type} \Op{\VAR{environment}\DF{\NIL}})} 136 | { 137 | \retval{\T} if \VAR{foo} is of \VAR{type}. 138 | } 139 | 140 | \IT{(\FU*{SUBTYPEP} \VAR{type-a} \VAR{type-b} 141 | \Op{\VAR{environment}})} 142 | { 143 | Return \retval{\T} if \VAR{type-a} is a recognizable subtype of 144 | \VAR{type-b}, and \retvalii{\NIL} if the relationship could not be 145 | determined. 146 | } 147 | 148 | \IT{(\SO*{THE} \NEV{\VAR{type}} \VAR{form})} 149 | { 150 | Declare \retval{values of \VAR{form}} to be of 151 | \VAR{type}. 152 | } 153 | 154 | \IT{(\FU*{COERCE} \VAR{object} \VAR{type})} 155 | { 156 | Coerce \retval{\VAR{object}} into \VAR{type}. 157 | } 158 | 159 | \IT{(\MC*{TYPECASE} \VAR{foo} \OPn{(\NEV{\VAR{type}} \PROGN{\VAR{a-form}})} 160 | \OP{(\xorGOO{\kwd*{OTHERWISE}\\ 161 | \T}{\}} \PROGN{\VAR{b-form}\DF{\NIL}})})} 162 | { 163 | Return \retval{values of the first \OPn{\VAR{a-form}}} whose \VAR{type} is 164 | \VAR{foo} of. Return \retval{values of \VAR{b-form}s} if no 165 | \VAR{type} matches. 166 | % Keep \OPn{\VAR{a-form}} instead of the otherwise preferable 167 | % \VAR{a-form}s because we're talking about one set of a-forms out 168 | % of several. 169 | } 170 | 171 | \IT{(\xorGOO{% 172 | \MC*{ETYPECASE}\\ 173 | \MC*{CTYPECASE}}{\}} 174 | \VAR{foo} 175 | \OPn{(\NEV{\VAR{type}} \PROGN{\VAR{form}})})} 176 | { 177 | Return \retval{values of the first \OPn{\VAR{form}}} whose \VAR{type} is 178 | \VAR{foo} of. Signal non-correctable/correctable \kwd{type-error} 179 | if no \VAR{type} matches. 180 | % Keep \OPn{\VAR{form}} instead of the otherwise preferable 181 | % \VAR{form}s because we're talking about one set of forms out 182 | % of several. 183 | } 184 | 185 | \IT{(\FU*{TYPE-OF} \VAR{foo})} 186 | { 187 | \retval{Type of \VAR{foo}}. 188 | } 189 | 190 | \IT{(\MC*{CHECK-TYPE} \VAR{place} \VAR{type} 191 | \Op{\VAR{string}\DF{\Goo{\LIT{a}\XOR\LIT{an}}\hspace{.3ex}\VAR{type}}})} 192 | { 193 | Signal correctable \kwd{type-error} if \VAR{place} is 194 | not of \VAR{type}. Return \retval{\NIL}. 195 | } 196 | 197 | \IT{(\FU*{STREAM-ELEMENT-TYPE} \VAR{stream})} 198 | { 199 | \retval{Type} of \VAR{stream} objects. 200 | } 201 | 202 | \IT{(\FU*{ARRAY-ELEMENT-TYPE} \VAR{array})} 203 | { 204 | Element \retval{type} \VAR{array} can hold. 205 | } 206 | 207 | \IT{(\FU*{UPGRADED-ARRAY-ELEMENT-TYPE} \VAR{type} 208 | \Op{\VAR{environment}\DF{\NIL}})} 209 | { 210 | \retval{Element type} of most specialized array capable of holding 211 | elements of \VAR{type}. 212 | } 213 | 214 | \IT{(\MC*{DEFTYPE} \VAR{foo} (\OPn{\VAR{macro-$\lambda$}}) 215 | \orGOO{% 216 | \OPn{(\kwd{declare } \OPn{\NEV{\VAR{decl}}})}\\ 217 | \NEV{\VAR{doc}}}{\}} 218 | \PROGN{\VAR{form}})} 219 | { 220 | Define type \retval{\VAR{foo}} which when referenced as (\VAR{foo} 221 | \OPn{\NEV{\VAR{arg}}}) (or as \VAR{foo} if \VAR{macro-$\lambda$} 222 | doesn't contain any required parameters) applies expanded \VAR{form}s to \VAR{arg}s 223 | returning the new type. For (\OPn{\VAR{macro-$\lambda$}}) see 224 | page \pageref{section:Macros} but with default value of \kwd{\A} 225 | instead of \NIL. \VAR{form}s are enclosed in an implicit \SO{block} 226 | named \VAR{foo}. 227 | } 228 | 229 | \IT{\arrGOO{(\kwd*{EQL } \VAR{foo})\\ 230 | (\kwd*{MEMBER } \OPn{\VAR{foo}})}{.}} 231 | { 232 | Specifier for a type comprising \VAR{foo} or \VAR{foo}s. 233 | } 234 | 235 | \IT{(\kwd*{SATISFIES} \VAR{predicate})} 236 | { 237 | Type specifier for all objects satisfying \VAR{predicate}. 238 | } 239 | 240 | \IT{(\kwd*{MOD} \VAR{n})} 241 | { 242 | Type specifier for all non-negative integers $$}\RP{\VAR{ 29 | number}})\\(\FU{\boldmath$>$=}\RP{\VAR{ 30 | number}})\\(\FU{\boldmath$<$}\RP{\VAR{ 31 | number}})\\(\FU{\boldmath$<$=}\RP{\VAR{ number}})}{.}} 32 | { 33 | \index{>@$>$}% 34 | \index{>=@$>$=}% 35 | \index{<@$<$}% 36 | \index{<=@$<$=}% 37 | Return \retval{\T} if \VAR{number}s are 38 | monotonically decreasing, monotonically non-increasing, 39 | monotonically increasing, or monotonically non-decreasing, respectively. 40 | } 41 | 42 | \IT{\arrGOO{(\FU*{MINUSP} \VAR{ a})\\ 43 | (\FU*{ZEROP} \VAR{ a})\\ 44 | (\FU*{PLUSP} 45 | \VAR{ a})}{.}} 46 | { 47 | \retval{\T} if $a < 0$, $a = 0$, or $a > 0$, respectively. 48 | } 49 | 50 | \IT{\arrGOO{(\FU*{EVENP } \VAR{int})\\ 51 | (\FU*{ODDP } \VAR{int})}{.}} 52 | { 53 | \retval{\T} if \VAR{int} is even or odd, respectively. 54 | } 55 | 56 | \IT{\arrGOO{(\FU*{NUMBERP} \VAR{ foo})\\ 57 | (\FU*{REALP} \VAR{ foo})\\ 58 | (\FU*{RATIONALP} \VAR{ foo})\\ 59 | (\FU*{FLOATP} \VAR{ foo})\\ 60 | (\FU*{INTEGERP} \VAR{ foo})\\ 61 | (\FU*{COMPLEXP} \VAR{ foo})\\ 62 | (\FU*{RANDOM-STATE-P} \VAR{ foo}) 63 | }{.}} 64 | { 65 | \retval{\T} if \VAR{foo} is of 66 | indicated type. 67 | } 68 | 69 | \end{LIST} 70 | 71 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 72 | \subsection{Numeric Functions} 73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 74 | 75 | \begin{LIST}{1cm} 76 | 77 | \IT{\arrGOO{(\FU*{+} \OPn{\VAR{ a}\DF{\LIT{0}}})\\ 78 | (\FU{\A} \OPn{\VAR{ a}\DF{\LIT{1}}})}{.}} 79 | {\index{*@\A} 80 | Return \retval{$\sum{a}$} or \retval{$\prod{a}$}, respectively. 81 | } 82 | 83 | \IT{\arrGOO{(\FU*{--} \VAR{ a}\OPn{\VAR{ b}})\\ 84 | (\FU*{/} \VAR{ a} 85 | \OPn{\VAR{ b}})}{.}} 86 | { 87 | Return \retval{$a-\sum{b}$} or \retval{$a/\prod{b}$}, respectively. Without any 88 | \VAR{b}s, return \retval{$-a$} or \retval{$1/a$}, respectively. 89 | } 90 | 91 | \IT{\arrGOO{(\FU*{1+} \VAR{ a})\\(\FU*{1--} \VAR{ a})}{.}} 92 | {Return \retval{$a+1$} or 93 | \retval{$a-1$}, respectively. 94 | } 95 | 96 | \IT{(\xorGOO{\MC*{INCF}\\ 97 | \MC*{DECF}}{\}} \DES{\VAR{place}} 98 | \Op{\VAR{delta}\DF{\LIT{1}}})} 99 | { 100 | Increment or decrement the value of \VAR{place} by \VAR{delta}. Return \retval{new value}. 101 | } 102 | 103 | \IT{\arrGOO{% 104 | (\FU*{EXP } \VAR{p})\\ 105 | (\FU*{EXPT } \VAR{b } \VAR{p})}{.}\qquad\qquad} 106 | { 107 | Return \retval{$\mbox{e}^p$} or \retval{$b^p$}, respectively. 108 | } 109 | 110 | \IT{(\FU*{LOG} \VAR{a} \Op{\VAR{b}\DF{e}})} 111 | { 112 | Return \retval{$\log_b a$} or, 113 | without \VAR{b}, \retval{$\ln a$}. 114 | } 115 | 116 | \IT{\arrGOO{(\FU*{SQRT} \VAR{ n})\\ 117 | (\FU*{ISQRT} \VAR{ n})}{.}\qquad\qquad} 118 | { 119 | \retval{$\sqrt{n}$} in complex numbers/natural numbers. 120 | } 121 | 122 | \IT{\arrGOO{(\FU*{LCM} \OPn{\VAR{ integer}}\DF{\LIT{1}})\\ 123 | (\FU*{GCD} \OPn{\VAR{ integer}})}{.}} 124 | { 125 | \retval{Least common multiple} or \retval{greatest common 126 | de\-no\-mi\-na\-tor}, respectively, of \VAR{integer}s. (\kwd{gcd}) 127 | returns \retval{0}. 128 | } 129 | 130 | \IT{\CNS*{PI}\qquad\qquad} 131 | { 132 | \kwd{long-float} approximation of $\pi$, Ludolph's number. 133 | } 134 | 135 | \IT{\arrGOO{(\FU*{SIN} \VAR{ a})\\ 136 | (\FU*{COS} \VAR{ a})\\ 137 | (\FU*{TAN} \VAR{ a})}{.}} 138 | { 139 | \retval{$\sin a$}, \retval{$\cos 140 | a$}, or \retval{$\tan a$}, respectively. (\VAR{a} in radians.) 141 | } 142 | 143 | \IT{\arrGOO{(\FU*{ASIN} \VAR{ a})\\ 144 | (\FU*{ACOS} \VAR{ a})}{.}} 145 | { 146 | \retval{$\arcsin a$} or \retval{$\arccos 147 | a$}, respectively, in radians. 148 | } 149 | 150 | \IT{(\FU*{ATAN} \VAR{a} \Op{\VAR{b}\DF{\LIT{1}}})} 151 | { 152 | \retval{$\arctan \frac{a}{b}$} in radians. 153 | } 154 | 155 | \IT{\arrGOO{(\FU*{SINH} \VAR{ a})\\(\FU*{COSH} \VAR{ a})\\(\FU*{TANH} 156 | \VAR{ a})}{.}} 157 | { 158 | \retval{$\sinh a$}, \retval{$\cosh 159 | a$}, or \retval{$\tanh a$}, respectively. 160 | } 161 | 162 | \IT{\arrGOO{(\FU*{ASINH} \VAR{ a})\\ 163 | (\FU*{ACOSH} \VAR{ a}) 164 | \\(\FU*{ATANH} \VAR{ a})}{.}} 165 | { 166 | \retval{$\operatorname{asinh} a$}, \retval{$\operatorname{acosh} 167 | a$}, or \retval{$\operatorname{atanh} a$}, respectively. 168 | } 169 | 170 | \IT{(\FU*{CIS} \VAR{a})\qquad\qquad} 171 | { 172 | Return 173 | \retval{$\operatorname{e}^{\operatorname{i} a}$} $=$ \retval{$\cos a + 174 | \operatorname{i}\sin a$}. 175 | } 176 | 177 | \IT{(\FU*{CONJUGATE} \VAR{a})} 178 | { 179 | Return complex \retval{conjugate of \VAR{a}}. 180 | } 181 | 182 | \IT{\arrGOO{(\FU*{MAX } \RP{\VAR{num}})\\ 183 | (\FU*{MIN } \RP{\VAR{num}})}{.}} 184 | { 185 | \retval{Greatest} or \retval{least}, respectively, of \VAR{num}s. 186 | } 187 | 188 | \IT{(\xorGOO{% 189 | \Goo{\FU*{ROUND}\XOR\FU*{FROUND}}\\ 190 | \Goo{\FU*{FLOOR}\XOR\FU*{FFLOOR}}\\ 191 | \Goo{\FU*{CEILING}\XOR\FU*{FCEILING}}\\ 192 | \Goo{\FU*{TRUNCATE}\XOR\FU*{FTRUNCATE}}}{\}} 193 | \VAR{n} \Op{\VAR{d}\DF{\LIT{1}}})} 194 | { 195 | Return as \kwd{integer} or \kwd{float}, respectively, \retval{$n/d$} 196 | rounded, or rounded towards $-\infty$, $+\infty$, or $0$, 197 | respectively; and \retvalii{re\-main\-der}. 198 | } 199 | 200 | \IT{(\xorGOO{\FU*{MOD}\\ 201 | \FU*{REM}}{\}} \VAR{n} \VAR{d})} 202 | {Same as \FU{floor} or 203 | \FU{truncate}, respectively, but return \retval{re\-main\-der} only. 204 | } 205 | 206 | \IT{(\FU*{RANDOM} \VAR{limit} \Op{\DES{\VAR{state}}\DF{\V{\A random-state\A}}})} 207 | { 208 | Return non-negative \retval{random number} less than \VAR{limit}, 209 | and of the same type. 210 | } 211 | 212 | \IT{(\FU*{MAKE-RANDOM-STATE} \OP{\Goo{\VAR{state}\XOR\NIL\XOR\T}\DF{\NIL}})} 213 | { 214 | \retval{Copy} of \kwd{random-state} object \VAR{state} or of 215 | the current random state; or a randomly initialized fresh \retval{random 216 | state}. 217 | } 218 | 219 | \IT{\V{\A random-state\A}\qquad\qquad\qquad} 220 | {\index{*RANDOM-STATE*@\A RANDOM-STATE\A} 221 | Current random state. 222 | } 223 | 224 | \IT{(\FU*{FLOAT-SIGN} \VAR{num-a} \Op{\VAR{num-b}\DF{\LIT{1}}})} 225 | { 226 | \retval{\VAR{num-b}} with \VAR{num-a}'s sign. 227 | } 228 | 229 | \IT{(\FU*{SIGNUM} \VAR{n})} 230 | {\retval{Number} of magnitude 1 231 | representing sign or phase of \VAR{n}. 232 | } 233 | 234 | \IT{\arrGOO{(\FU*{NUMERATOR} \VAR{ rational})\\ 235 | (\FU*{DENOMINATOR} \VAR{ rational})}{.}} 236 | { 237 | \retval{Numerator} or \retval{denominator}, respectively, of 238 | \VAR{rational}'s canonical form. 239 | } 240 | 241 | \IT{\arrGOO{(\FU*{REALPART} \VAR{ number})\\ 242 | (\FU*{IMAGPART} \VAR{ number})}{.}} 243 | { 244 | \retval{Real part} or \retval{imaginary part}, respectively, of \VAR{number}. 245 | } 246 | 247 | \IT{(\FU*{COMPLEX} \VAR{real} \Op{\VAR{imag}\DF{\LIT{0}}})} 248 | { 249 | Make a \retval{complex number}. 250 | } 251 | 252 | \IT{(\FU*{PHASE} \VAR{num})} 253 | { 254 | \retval{Angle} of \VAR{num}'s polar representation. 255 | } 256 | 257 | \IT{(\FU*{ABS} \VAR{n})\qquad\qquad} 258 | { 259 | Return \retval{$|n|$}. 260 | } 261 | 262 | \IT{\arrGOO{(\FU*{RATIONAL} \VAR{ real})\\ 263 | (\FU*{RATIONALIZE} \VAR{ real})}{.}} 264 | { 265 | Convert \VAR{real} to \retval{rational}. Assume complete/limited accuracy for \VAR{real}. 266 | } 267 | 268 | \IT{(\FU*{FLOAT} \VAR{real} 269 | \Op{\VAR{prototype}\DF{\LIT{0.0F0}}})} 270 | { 271 | Convert \VAR{real} into \retval{float} with type of \VAR{prototype}. 272 | } 273 | 274 | \end{LIST} 275 | 276 | 277 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 278 | \subsection{Logic Functions} 279 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 280 | \label{section:Logic Functions} 281 | Negative integers are used in 282 | two's complement representation. 283 | 284 | \begin{LIST}{1cm} 285 | 286 | \IT{(\FU*{BOOLE} \VAR{operation} \VAR{int-a} \VAR{int-b})} 287 | { 288 | Return 289 | \retval{value} of bitwise logical \VAR{operation}. \VAR{operation}s 290 | are 291 | } 292 | 293 | \begin{LIST}{.5cm} 294 | \IT{\CNS*{BOOLE-1}\qquad\qquad} {\retval{\VAR{int-a}}.} 295 | \IT{\CNS*{BOOLE-2}\qquad\qquad} {\retval{\VAR{int-b}}.} 296 | \IT{\CNS*{BOOLE-C1}\qquad\qquad} {\retval{$\lnot\text{\VAR{int-a}}$}.} 297 | \IT{\CNS*{BOOLE-C2}\qquad\qquad} {\retval{$\lnot\text{\VAR{int-b}}$}.} 298 | \IT{\CNS*{BOOLE-SET}\qquad\qquad} {\retval{All bits set}.} 299 | \IT{\CNS*{BOOLE-CLR}\qquad\qquad} {\retval{All bits zero}.} 300 | \IT{\CNS*{BOOLE-EQV}\qquad\qquad} {\retval{$\text{\VAR{int-a}} \equiv \text{\VAR{int-b}}$}.} 301 | \IT{\CNS*{BOOLE-AND}\qquad\qquad} {\retval{$\text{\VAR{int-a}}\land\text{\VAR{int-b}}$}.} 302 | \IT{\CNS*{BOOLE-ANDC1}} {\retval{$\lnot \text{\VAR{int-a}} \land \text{\VAR{int-b}}$}.} 303 | \IT{\CNS*{BOOLE-ANDC2}} {\retval{$\text{\VAR{int-a}} \land \lnot\text{\VAR{int-b}}$}.} 304 | \IT{\CNS*{BOOLE-NAND}} {\retval{$\lnot(\text{\VAR{int-a}} \land \text{\VAR{int-b}})$}.} 305 | \IT{\CNS*{BOOLE-IOR}\qquad\qquad} {\retval{$\text{\VAR{int-a}} \lor \text{\VAR{int-b}}$}.} 306 | \IT{\CNS*{BOOLE-ORC1}\qquad} {\retval{$\lnot \text{\VAR{int-a}} \lor \text{\VAR{int-b}}$}.} 307 | \IT{\CNS*{BOOLE-ORC2}\qquad} {\retval{$\text{\VAR{int-a}} \lor \lnot\text{\VAR{int-b}}$}.} 308 | \IT{\CNS*{BOOLE-XOR}\qquad\qquad} {\retval{$\lnot(\text{\VAR{int-a}} \equiv \text{\VAR{int-b}})$}.} 309 | \IT{\CNS*{BOOLE-NOR}\qquad\qquad} {\retval{$\lnot(\text{\VAR{int-a}} \lor \text{\VAR{int-b}})$}.} 310 | \end{LIST} 311 | 312 | \IT{(\FU*{LOGNOT}\VAR{ integer})\qquad\qquad} 313 | { 314 | \retval{$\lnot\text{\VAR{integer}}$}. 315 | } 316 | 317 | \IT{\arrGOO{(\FU*{LOGEQV} \OPn{\VAR{ integer}})\\ 318 | (\FU*{LOGAND} \OPn{\VAR{ integer}})}{.}} 319 | { 320 | Return \retval{value of exclusive-nored or anded \VAR{integer}s}, 321 | respectively. Without any \VAR{integer}, return \retval{$-1$}. 322 | } 323 | 324 | \IT{(\FU*{LOGANDC1} \VAR{int-a} \VAR{int-b})} 325 | { 326 | \retval{$\lnot \text{\VAR{int-a}} \land \text{\VAR{int-b}}$}. 327 | } 328 | 329 | \IT{(\FU*{LOGANDC2} \VAR{int-a} \VAR{int-b})} 330 | { 331 | \retval{$\text{\VAR{int-a}} \land \lnot\text{\VAR{int-b}}$}. 332 | } 333 | 334 | \IT{(\FU*{LOGNAND} \VAR{int-a} \VAR{int-b})\qquad} 335 | { 336 | \retval{$\lnot(\text{\VAR{int-a}} \land \text{\VAR{int-b}})$}. 337 | } 338 | 339 | \IT{\arrGOO{(\FU*{LOGXOR} \OPn{\VAR{ integer}})\\ 340 | (\FU*{LOGIOR} \OPn{\VAR{ integer}})}{.}} 341 | { 342 | Return \retval{value of exclusive-ored or ored \VAR{integer}s}, 343 | respectively. Without any \VAR{integer}, return \retval{0}. 344 | } 345 | 346 | \IT{(\FU*{LOGORC1} \VAR{int-a} \VAR{int-b})} 347 | { 348 | \retval{$\lnot \text{\VAR{int-a}} \lor \text{\VAR{int-b}}$}. 349 | } 350 | 351 | \IT{(\FU*{LOGORC2} \VAR{int-a} \VAR{int-b})} 352 | { 353 | \retval{$\text{\VAR{int-a}} \lor \lnot\text{\VAR{int-b}}$}. 354 | } 355 | 356 | \IT{(\FU*{LOGNOR} \VAR{int-a} \VAR{int-b})} 357 | { 358 | \retval{$\lnot(\text{\VAR{int-a}} \lor \text{\VAR{int-b}})$}. 359 | } 360 | 361 | \IT{(\FU*{LOGBITP} \VAR{i} \VAR{int})} 362 | { 363 | \retval{\T} if zero-indexed \VAR{i}th bit of \VAR{int} is set. 364 | } 365 | 366 | \IT{(\FU*{LOGTEST} \VAR{int-a} \VAR{int-b})} 367 | {Return \retval{\T} if 368 | there is any bit set in \VAR{int-a} which is set in \VAR{int-b} as well. 369 | } 370 | 371 | \IT{(\FU*{LOGCOUNT} \VAR{int})} 372 | { 373 | \retval{Number of 1 bits} in $\text{\VAR{int}}\ge 0$, 374 | \retval{number of 0 bits} in $\text{\VAR{int}}< 0$. 375 | } 376 | 377 | 378 | \end{LIST} 379 | 380 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 381 | \subsection{Integer Functions} 382 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 383 | \begin{LIST}{1cm} 384 | 385 | \IT{(\FU*{INTEGER-LENGTH} \VAR{integer})} 386 | { 387 | \retval{Number of bits} necessary to represent \VAR{integer}. 388 | } 389 | 390 | \IT{(\FU*{LDB-TEST} \VAR{byte-spec} \VAR{integer})} 391 | { 392 | Return \retval{\T} if any bit specified by \VAR{byte-spec} in 393 | \VAR{integer} is set. 394 | } 395 | 396 | \IT{(\FU*{ASH} \VAR{integer} \VAR{count})} 397 | { 398 | Return copy of \retval{\VAR{integer}} arithmetically shifted left by 399 | \VAR{count} adding zeros 400 | at the right, or, for $\VAR{count}<0$, shifted right discarding 401 | bits. 402 | } 403 | 404 | \IT{(\FU*{LDB} \VAR{byte-spec} \VAR{integer})} 405 | { 406 | Extract \retval{byte} denoted by \VAR{byte-spec} from 407 | \VAR{integer}. \kwd{setf}able. 408 | } 409 | 410 | \IT{(\xorGOO{\FU*{DEPOSIT-FIELD}\\ 411 | \FU*{DPB}}{\}} 412 | \VAR{int-a} \VAR{byte-spec} \VAR{int-b})} 413 | { 414 | Return \retval{\VAR{int-b}} with bits denoted by \VAR{byte-spec} replaced 415 | by corresponding bits of \VAR{int-a}, or by the low (\FU{byte-size} 416 | \VAR{byte-spec}) bits of \VAR{int-a}, respectively. 417 | } 418 | 419 | \IT{(\FU*{MASK-FIELD} \VAR{byte-spec} \VAR{integer})} 420 | { 421 | Return copy of \retval{\VAR{integer}} with all bits unset but those denoted by 422 | \VAR{byte-spec}. \kwd{setf}able. 423 | } 424 | 425 | \IT{(\FU*{BYTE} \VAR{size} \VAR{position})} 426 | { 427 | \retval{Byte specifier} for a byte of \VAR{size} bits starting at a 428 | weight of $2^{\VAR{position}}$. 429 | } 430 | 431 | \IT{\arrGOO{(\FU*{BYTE-SIZE} \VAR{ byte-spec})\\ 432 | (\FU*{BYTE-POSITION} \VAR{ byte-spec})}{.}} 433 | { 434 | \retval{Size} or \retval{position}, respectively, of \VAR{byte-spec}. 435 | } 436 | 437 | \end{LIST} 438 | 439 | 440 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 441 | \subsection{Implementation-Dependent} 442 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 443 | \begin{LIST}{1cm} 444 | 445 | \IT{\arrGOO{\CNS{SHORT-FLOAT}\\ 446 | \CNS{SINGLE-FLOAT}\\ 447 | \CNS{DOUBLE-FLOAT}\\ 448 | \CNS{LONG-FLOAT}}{\}}\kwd{-}% 449 | \xorGOO{\kwd{EPSILON}\\ 450 | \kwd{NEGATIVE-EPSILON}}{.}} 451 | { 452 | \index{SHORT-FLOAT-EPSILON}% 453 | \index{SINGLE-FLOAT-EPSILON}% 454 | \index{DOUBLE-FLOAT-EPSILON}% 455 | \index{LONG-FLOAT-EPSILON}% 456 | \index{SHORT-FLOAT-NEGATIVE-EPSILON}% 457 | \index{SINGLE-FLOAT-NEGATIVE-EPSILON}% 458 | \index{DOUBLE-FLOAT-NEGATIVE-EPSILON}% 459 | \index{LONG-FLOAT-NEGATIVE-EPSILON}% 460 | Smallest possible number making a difference when added or subtracted, respectively. 461 | } 462 | 463 | \IT{\arrGOO{% 464 | \CNS{LEAST-NEGATIVE}\\ 465 | \CNS{LEAST-NEGATIVE-NORMALIZED}\\ 466 | \CNS{LEAST-POSITIVE}\\ 467 | \CNS{LEAST-POSITIVE-NORMALIZED}}{\}}% 468 | \kwd{-}% 469 | \xorGOO{% 470 | \kwd{SHORT-FLOAT}\\ 471 | \kwd{SINGLE-FLOAT}\\ 472 | \kwd{DOUBLE-FLOAT}\\ 473 | \kwd{LONG-FLOAT}}{.}} 474 | { 475 | \index{LEAST-NEGATIVE-SHORT-FLOAT}% 476 | \index{LEAST-NEGATIVE-NORMALIZED-SHORT-FLOAT}% 477 | \index{LEAST-NEGATIVE-SINGLE-FLOAT}% 478 | \index{LEAST-NEGATIVE-NORMALIZED-SINGLE-FLOAT}% 479 | \index{LEAST-NEGATIVE-DOUBLE-FLOAT}% 480 | \index{LEAST-NEGATIVE-NORMALIZED-DOUBLE-FLOAT}% 481 | \index{LEAST-NEGATIVE-LONG-FLOAT}% 482 | \index{LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT}% 483 | \index{LEAST-POSITIVE-SHORT-FLOAT}% 484 | \index{LEAST-POSITIVE-NORMALIZED-SHORT-FLOAT}% 485 | \index{LEAST-POSITIVE-SINGLE-FLOAT}% 486 | \index{LEAST-POSITIVE-NORMALIZED-SINGLE-FLOAT}% 487 | \index{LEAST-POSITIVE-DOUBLE-FLOAT}% 488 | \index{LEAST-POSITIVE-NORMALIZED-DOUBLE-FLOAT}% 489 | \index{LEAST-POSITIVE-LONG-FLOAT}% 490 | \index{LEAST-POSITIVE-NORMALIZED-LONG-FLOAT}% 491 | Available numbers closest to $-0$ or $+0$, respectively. 492 | } 493 | 494 | \IT{\arrGOO{\CNS{MOST-NEGATIVE}\\ 495 | \CNS{MOST-POSITIVE}}{\}}% 496 | \kwd{-}% 497 | \xorGOO{% 498 | \kwd{SHORT-FLOAT}\\ 499 | \kwd{SINGLE-FLOAT}\\ 500 | \kwd{DOUBLE-FLOAT}\\ 501 | \kwd{LONG-FLOAT}\\ 502 | \kwd{FIXNUM}}{.}} 503 | { 504 | \index{MOST-NEGATIVE-DOUBLE-FLOAT}% 505 | \index{MOST-NEGATIVE-LONG-FLOAT}% 506 | \index{MOST-NEGATIVE-SHORT-FLOAT}% 507 | \index{MOST-NEGATIVE-SINGLE-FLOAT}% 508 | \index{MOST-NEGATIVE-FIXNUM}% 509 | \index{MOST-POSITIVE-DOUBLE-FLOAT}% 510 | \index{MOST-POSITIVE-LONG-FLOAT}% 511 | \index{MOST-POSITIVE-SHORT-FLOAT}% 512 | \index{MOST-POSITIVE-SINGLE-FLOAT}% 513 | \index{MOST-POSITIVE-FIXNUM}% 514 | Available numbers closest to $-\infty$ or $+\infty$, respectively. 515 | } 516 | 517 | \IT{\arrGOO{(\FU*{DECODE-FLOAT} \VAR{ n})\\ 518 | (\FU*{INTEGER-DECODE-FLOAT} \VAR{ n})}{.}} 519 | { 520 | Return \retval{significand}, \retvalii{exponent}, and 521 | \retvaliii{sign} of \kwd{float} \VAR{n}. 522 | } 523 | 524 | \IT{(\FU*{SCALE-FLOAT} \VAR{n} \VAR{i})} 525 | { 526 | With \VAR{n}'s radix $b$, return $n b^{i}$. 527 | } 528 | 529 | \IT{\arrGOO{ 530 | (\FU*{FLOAT-RADIX} \VAR{ n})\\ 531 | (\FU*{FLOAT-DIGITS} \VAR{ n})\\ 532 | (\FU*{FLOAT-PRECISION} \VAR{ n})}{.}} 533 | { 534 | \retval{Radix}, \retval{number of digits} in that radix, or 535 | \retval{precision} in that radix, respectively, of float \VAR{n}. 536 | } 537 | 538 | \IT{(\FU*{UPGRADED-COMPLEX-PART-TYPE} \VAR{foo} \Op{\VAR{environment}\DF{\NIL}})} 539 | {\retval{Type} of most specialized \kwd{complex} number able to hold 540 | parts of type \VAR{foo}. 541 | } 542 | 543 | \end{LIST} 544 | 545 | 546 | % LocalWords: de na der nored ored 547 | 548 | %%% Local Variables: 549 | %%% mode: latex 550 | %%% TeX-master: "clqr" 551 | %%% End: 552 | -------------------------------------------------------------------------------- /clqr-clos.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2018 2 | % Bert Burgemeister 3 | % 4 | % Permission is granted to copy, distribute and/or modify this 5 | % document under the terms of the GNU Free Documentation License, 6 | % Version 1.2; with no Invariant Sections, no Front-Cover Texts and 7 | % no Back-Cover Texts. For details see file COPYING. 8 | % 9 | 10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 11 | \section{CLOS} 12 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | \subsection{Classes} 16 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 17 | 18 | \begin{LIST}{1cm} 19 | 20 | \IT{(\FU*{SLOT-EXISTS-P} \VAR{foo} \VAR{bar})\qquad\qquad} 21 | { 22 | \retval{\T} if \VAR{foo} has a slot \VAR{bar}. 23 | } 24 | 25 | \IT{(\FU*{SLOT-BOUNDP} \VAR{instance} \VAR{slot})} 26 | { 27 | \retval{\T} if \VAR{slot} in \VAR{instance} is bound. 28 | } 29 | 30 | \IT{(\MC*{DEFCLASS} \VAR{foo} 31 | (\OPn{\VAR{superclass}}\DF{\kwd{standard-object}}) 32 | (\xorGOO{% 33 | \VAR{slot}\\ 34 | (\VAR{slot } 35 | \orGOO{% 36 | \Goos{\kwd{:reader} \VAR{reader}}\\ 37 | \Goos{\kwd{:writer} \xorGOO{% 38 | \VAR{writer}\\ 39 | ({\kwd{setf}\VAR{ writer}})}{\}}} \\ 40 | \Goos{\kwd{:accessor} \VAR{accessor}} \\ 41 | \kwd{:allocation } \xorGOO{% 42 | \kwd{:instance}\\ 43 | \kwd{:class}}{\}}\DF{\kwd{:instance}}\\ 44 | \Goos{\kwd{:initarg} \Op{\kwd{:}}\VAR{initarg-name}} \\ 45 | \kwd{:initform} \VAR{ form}\\ 46 | \kwd{:type} \VAR{ type}\\ 47 | \kwd{:documentation} 48 | \VAR{ slot-doc}}{\}})}{\}^{\!\!\!*}}) 49 | \orGOO{% 50 | (\kwd{:default-initargs } \Goos{\VAR{name}\VAR{ value}})\\ 51 | (\kwd{:documentation} \VAR{ class-doc})\\ 52 | (\kwd{:metaclass} \VAR{ name}\DF{\kwd{standard-class}})}{\}})} 53 | { 54 | Define or modify \retval{class \VAR{foo}} as a subclass of 55 | \VAR{superclass}es. Transform existing instances, if any, 56 | by \GFU{make-instances-obsolete}. In a new instance \VAR{i} of 57 | \VAR{foo}, a \VAR{slot}'s value defaults to \VAR{form} unless set 58 | via \Op{\kwd{:}}\VAR{initarg-name}; it is readable via (\VAR{reader} 59 | \VAR{i}) or (\VAR{accessor} \VAR{i}), and writable via 60 | (\VAR{writer} \VAR{value} \VAR{i}) or (\kwd{setf} (\VAR{accessor} 61 | \VAR{i}) \VAR{value}). \VAR{slot}s with \kwd{:allocation :class} 62 | are shared by all instances of class \VAR{foo}. 63 | } 64 | 65 | \IT{(\FU*{FIND-CLASS} \VAR{symbol} \OP{\VAR{errorp}\DF{\T} 66 | \Op{\VAR{environment}}})} 67 | { 68 | Return \retval{class} named \VAR{symbol}. \kwd{setf}able. 69 | } 70 | 71 | \IT{(\GFU*{MAKE-INSTANCE} \VAR{class} \Goos{\Op{\kwd{:}}\VAR{initarg} 72 | \VAR{value}} \OPn{\VAR{other-keyarg}})} 73 | { 74 | Make new \retval{instance of \VAR{class}}. 75 | } 76 | 77 | \IT{(\GFU*{REINITIALIZE-INSTANCE} \VAR{instance} \Goos{\Op{\kwd{:}}\VAR{initarg} 78 | \VAR{value}} \OPn{\VAR{other-keyarg}})} 79 | { 80 | Change local slots of \retval{\VAR{instance}} according to 81 | \VAR{initarg}s by means of \GFU{shared-initialize}. 82 | } 83 | 84 | \IT{(\FU*{SLOT-VALUE} \VAR{foo} \VAR{slot})} 85 | { 86 | Return \retval{value 87 | of \VAR{slot} in \VAR{foo}}. \kwd{SETF}able. 88 | } 89 | 90 | \IT{(\FU*{SLOT-MAKUNBOUND} \VAR{instance} \VAR{slot})} 91 | { 92 | Make \VAR{slot} in \retval{\VAR{instance}} unbound. 93 | } 94 | 95 | \IT{(\xorGOO{% 96 | \MC*{WITH-SLOTS } (\Goos{\NEV{\VAR{slot}}\XOR(\NEV{\VAR{var}} \NEV{\VAR{slot}})})\\ 97 | \MC*{WITH-ACCESSORS } (\OPn{(\NEV{\VAR{var}}\text{ } \NEV{\VAR{accessor}})})}{\}} 98 | \VAR{instance} \OPn{(\kwd{declare} \OPn{\NEV{\VAR{decl}}})} 99 | \PROGN{\VAR{form}})} 100 | { 101 | Return \retval{values of \VAR{form}s} after evaluating them in a 102 | lexical environment with slots of \VAR{instance} visible as 103 | \kwd{setf}able \VAR{slot}s or \VAR{var}s/with \VAR{accessor}s of 104 | \VAR{instance} visible as \kwd{setf}able \VAR{var}s. 105 | } 106 | 107 | \IT{\arrGOO{(\GFU*{CLASS-NAME } \VAR{class})\\ 108 | ((\kwd{setf } \GFU*{CLASS-NAME}) \VAR{ new-name } \VAR{class})}{.}} 109 | { 110 | Get/set \retval{name of \VAR{class}}. 111 | } 112 | 113 | \IT{(\FU*{CLASS-OF} \VAR{foo})} 114 | { 115 | \retval{Class} \VAR{foo} is a direct instance of. 116 | } 117 | 118 | \IT{(\GFU*{CHANGE-CLASS} \DES{\VAR{instance}} \VAR{new-class} 119 | \Goos{\Op{\kwd{:}}\VAR{initarg} \VAR{value}} \OPn{\VAR{other-keyarg}})} 120 | { 121 | Change class of \retval{\VAR{instance}} to \VAR{new-class}. 122 | Retain the status of any slots that are common between 123 | \VAR{instance}'s original class and \VAR{new-class}. Initialize 124 | any newly added slots with the \VAR{value}s of the corresponding 125 | \VAR{initarg}s if any, or with the values of their 126 | \kwd{:initform} forms if not. 127 | } 128 | 129 | \IT{(\GFU*{MAKE-INSTANCES-OBSOLETE} \VAR{class})} 130 | { 131 | Update all existing instances of \VAR{class} using 132 | \GFU{update-instance-for-redefined-class}. 133 | } 134 | 135 | \IT{(\xorGOO{% 136 | \GFU*{INITIALIZE-INSTANCE } \VAR{instance}\\ 137 | \GFU*{UPDATE-INSTANCE-FOR-DIFFERENT-CLASS} 138 | \VAR{ previous }\VAR{current}}{\}} 139 | \Goos{\Op{\kwd{:}}\VAR{initarg} 140 | \VAR{value}} \OPn{\VAR{other-keyarg}})} 141 | { 142 | Set slots on behalf of \GFU{make-instance}/of 143 | \GFU{change-class} by means of \GFU{shared-initialize}. 144 | } 145 | 146 | \IT{(\GFU*{UPDATE-INSTANCE-FOR-REDEFINED-CLASS} 147 | \VAR{new-instance} 148 | \VAR{added-slots} 149 | \VAR{discarded-slots} 150 | \VAR{discarded-slots-property-list} 151 | \Goos{% 152 | \Op{\kwd{:}}\VAR{initarg} 153 | \VAR{value}} 154 | \OPn{\VAR{other-keyarg}})} 155 | { 156 | On behalf of \GFU{make-instances-obsolete} and by means of 157 | \GFU{shared-initialize}, set any \VAR{initarg} slots to their 158 | corresponding \VAR{value}s; set any remaining \VAR{added-slots} to 159 | the values of their \kwd{:initform} forms. Not to be called by 160 | user. 161 | } 162 | 163 | \IT{(\GFU*{ALLOCATE-INSTANCE} \VAR{class} \Goos{\Op{\kwd{:}}\VAR{initarg} 164 | \VAR{value}} \OPn{\VAR{other-keyarg}})} 165 | { 166 | Return uninitialized \retval{instance} of \VAR{class}. Called by 167 | \GFU{make-instance}. 168 | } 169 | 170 | \IT{(\GFU*{SHARED-INITIALIZE} \VAR{instance} 171 | \xorGOO{% 172 | \VAR{initform-slots}\\ 173 | \T}{\}} 174 | \Goos{\Op{\kwd{:}}% 175 | \VAR{initarg-slot} 176 | \VAR{value}} 177 | \OPn{\VAR{other-keyarg}})} 178 | { 179 | Fill the \VAR{initarg-slot}s of \VAR{instance} with the 180 | corresponding \VAR{value}s, and fill those \VAR{initform-slots} 181 | that are not \VAR{initarg-slot}s with the values of their 182 | \kwd{:initform} forms. 183 | } 184 | 185 | \IT{\arrGOO{% 186 | (\GFU*{SLOT-MISSING } \VAR{class } \VAR{instance } \VAR{slot } 187 | \xorGOO{% 188 | \kwd{setf}\\ 189 | \kwd{slot-boundp}\\ 190 | \kwd{slot-makunbound}\\ 191 | \kwd{slot-value}}{\}} 192 | \Op{\VAR{value}})\\ 193 | (\GFU*{SLOT-UNBOUND } \VAR{class } \VAR{instance } \VAR{slot})}{.}} 194 | { 195 | Called on attempted access to non-existing or unbound 196 | \VAR{slot}. Default methods signal \kwd{error}/\kwd{unbound-slot}, 197 | respectively. Not to be called by user. 198 | } 199 | 200 | \end{LIST} 201 | 202 | 203 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 204 | \subsection{Generic Functions} 205 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 206 | 207 | \begin{LIST}{1cm} 208 | \IT{(\FU*{NEXT-METHOD-P})} 209 | { 210 | \retval{\T} if enclosing method has a next method. 211 | } 212 | 213 | \IT{(\MC*{DEFGENERIC} 214 | \xorGOO{\VAR{foo}\\ (\kwd{setf} \VAR{ foo})}{\}} 215 | (\OPn{\VAR{required-var}} 216 | \OP{\kwd{\&optional} \xorGOO{% 217 | \VAR{var}\\ 218 | (\VAR{var})}{\}^{\!\!*}}} 219 | \OP{\kwd{\&rest} \VAR{var}} 220 | \OP{\kwd{\&key} \xorGOO{% 221 | \VAR{var}\\ 222 | (\VAR{var}\XOR(\kwd{:}\VAR{key } 223 | \VAR{var}))}{\}^{\!\!*}} \Op{\kwd{\&allow-other-keys}}}) 224 | \orGOO{% 225 | (\kwd{:argument-precedence-order}\RP{\VAR{ required-var}})\\ 226 | (\kwd{declare }\RP{(\kwd{optimize}\VAR{ method-selection-optimization})})\\ 227 | (\kwd{:documentation } \NEV{\VAR{string}})\\ 228 | (\kwd{:generic-function-class} 229 | \VAR{ gf-class}\DF{\kwd{standard-generic-function}})\\ 230 | (\kwd{:method-class} \VAR{ method-class}\DF{\kwd{standard-method}})\\ 231 | (\kwd{:method-combination} 232 | \VAR{ c-type}\DF{\kwd{standard}} \OPn{\VAR{ c-arg}})\\ 233 | \OPn{(\kwd{:method} \VAR{ defmethod-args})}}{\}})} 234 | { 235 | Define or modify \retval{generic function} \VAR{foo}. Remove any 236 | methods previously defined by defgeneric. \VAR{gf-class} and the lambda 237 | paramters \OPn{\VAR{required-var}} and \OPn{\VAR{var}} must be 238 | compatible with existing methods. \VAR{defmethod-args} 239 | resemble those of \MC{defmethod}. For \VAR{c-type} see section 240 | \ref{section:Method Combination Types}. 241 | } 242 | 243 | \IT{(\FU*{ENSURE-GENERIC-FUNCTION} 244 | \xorGOO{\VAR{foo}\\ (\kwd{setf} \VAR{ foo})}{\}} 245 | \orGOO{% 246 | \kwd{:argument-precedence-order}\RP{\VAR{ required-var}}\\ 247 | \kwd{:declare }(\kwd{optimize}\VAR{ method-selection-optimization})\\ 248 | \kwd{:documentation} \VAR{ string}\\ 249 | \kwd{:generic-function-class} \VAR{ gf-class}\\ 250 | \kwd{:method-class} \VAR{ method-class}\\ 251 | \kwd{:method-combination} \VAR{ c-type} \OPn{\VAR{ c-arg}}\\ 252 | \kwd{:lambda-list} \VAR{ lambda-list}\\ 253 | \kwd{:environment} \VAR{ environment}}{\}})} 254 | { 255 | Define or modify \retval{generic function} 256 | \VAR{foo}. \VAR{gf-class} and \VAR{lambda-list} 257 | must be compatible with a pre-existing generic function or with 258 | existing methods, respectively. Changes to \VAR{method-class} do 259 | not propagate to existing methods. For \VAR{c-type} see section 260 | \ref{section:Method Combination Types}. 261 | } 262 | 263 | \IT{(\MC*{DEFMETHOD} 264 | \xorGOO{\VAR{foo}\\ 265 | (\kwd{setf} \VAR{ foo})}{\}} 266 | \Op{\xorGOO{\kwd{:before}\\ 267 | \kwd{:after}\\ 268 | \kwd{:around}\\ 269 | \OPn{\VAR{qualifier}}}{\}}\DF{primary method}} 270 | (\xorGOO{\VAR{var}\\ 271 | (\VAR{spec-var } \xorGOO{\VAR{class}\\ 272 | (\kwd{eql} \VAR{ bar})}{\}})}{\}^{\!\!*}} 273 | \OP{\kwd{\&optional} \xorGOO{\VAR{var}\\ 274 | (\VAR{var } \OP{\VAR{init } 275 | \Op{\VAR{supplied-p}}})}{\}^{\!\!*}}} 276 | \Op{\kwd{\&rest} \VAR{var}} 277 | \OP{\kwd{\&key} \xorGOO{\VAR{var}\\ 278 | (\xorGOO{\VAR{var}\\ 279 | (\kwd{:}\VAR{key } 280 | \VAR{var})}{\}} 281 | \OP{\VAR{init }\Op{\VAR{supplied-p}}})}{\}^{\!\!*}} 282 | \Op{\kwd{\&allow-other-keys}}} 283 | \OP{\kwd{\&aux }\xorGOO{\VAR{var}\\ 284 | (\VAR{var } \Op{\VAR{init}})}{\}^{\!\!*}}}) 285 | \orGOO{\OPn{(\kwd{declare } \OPn{\NEV{\VAR{decl}}})}\\ 286 | \NEV{\VAR{doc}}}{\}} 287 | \PROGN{\VAR{form}})} 288 | { 289 | Define \retval{new method} for generic function 290 | \VAR{foo}. \VAR{spec-var}s specialize to either being of \VAR{class} 291 | or being \kwd{eql} \VAR{bar}, respectively. On invocation, \VAR{var}s and 292 | \VAR{spec-var}s of the \retval{new method} 293 | act like parameters of a function with body 294 | \OPn{\VAR{form}}. \VAR{form}s are enclosed in an implicit \SO{block} 295 | \VAR{foo}. Applicable \VAR{qualifier}s depend on the 296 | \kwd{method-combination} type; see 297 | section \ref{section:Method Combination Types}. 298 | } 299 | 300 | \IT{(\xorGOO{\GFU*{ADD-METHOD}\\ 301 | \GFU*{REMOVE-METHOD}}{\}} \VAR{generic-function} \VAR{method})} 302 | { 303 | Add (if necessary) or remove (if any) \VAR{method} to/from 304 | \retval{\VAR{generic-function}}. 305 | } 306 | 307 | \IT{(\GFU*{FIND-METHOD} \VAR{generic-function} \VAR{qualifiers} 308 | \VAR{specializers} \Op{\VAR{error}\DF{\T}})} 309 | { 310 | Return suitable \retval{method}, or signal \kwd{error}. 311 | } 312 | 313 | \IT{(\GFU*{COMPUTE-APPLICABLE-METHODS} \VAR{generic-function} 314 | \VAR{args})} 315 | { 316 | \retval{List of methods} suitable for \VAR{args}, most specific first. 317 | } 318 | 319 | \IT{(\FU*{CALL-NEXT-METHOD} \OPn{\VAR{arg}}\DF{current args})} 320 | { 321 | From within a method, call next method with \VAR{arg}s; return 322 | \retval{its values}. 323 | } 324 | 325 | \IT{(\GFU*{NO-APPLICABLE-METHOD} \VAR{generic-function} 326 | \OPn{\VAR{arg}})} 327 | { 328 | Called on invocation of \VAR{generic-function} on \VAR{arg}s if 329 | there is no applicable method. Default method signals 330 | \kwd{error}. Not to be called by user. 331 | } 332 | 333 | \IT{(\xorGOO{% 334 | \FU*{INVALID-METHOD-ERROR} \VAR{ method}\\ 335 | \FU*{METHOD-COMBINATION-ERROR}}{\}} 336 | \VAR{control} \OPn{\VAR{arg}})} 337 | { 338 | Signal \kwd{error} on applicable method with invalid qualifiers, or 339 | on method combination. For \VAR{control} and \VAR{arg}s see 340 | \kwd{format}, page \pageref{section:Format}. 341 | } 342 | 343 | \IT{(\GFU*{NO-NEXT-METHOD} \VAR{generic-function} 344 | \VAR{method} \OPn{\VAR{arg}})} 345 | { 346 | Called on invocation of \kwd{call-next-method} when there is no next 347 | method. Default method signals \kwd{error}. Not to be called by 348 | user. 349 | } 350 | 351 | \IT{(\GFU*{FUNCTION-KEYWORDS} \VAR{method})} 352 | { 353 | Return list of \retval{keyword parameters} of \VAR{method} and 354 | \retvalii{\T} if other keys are allowed. 355 | } 356 | 357 | \IT{(\GFU*{METHOD-QUALIFIERS} \VAR{method})} 358 | { 359 | \retval{List of qualifiers} of \VAR{method}. 360 | } 361 | 362 | 363 | \end{LIST} 364 | 365 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 366 | \subsection{Method Combination Types} 367 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 368 | \label{section:Method Combination Types} 369 | \begin{LIST}{1cm} 370 | 371 | \IT{\kwd*{STANDARD}} 372 | { 373 | Evaluate most specific \kwd{:around} method supplying the values of 374 | the generic function. From within this method, \FU{call-next-method} 375 | can call less specific \kwd{:around} methods if there are any. If 376 | not, or if there are no \kwd{:around} methods at all, call all 377 | \kwd{:before} methods, most specific first, and the most specific 378 | primary method which supplies the values of the calling 379 | \FU{call-next-method} if any, or of the generic function; and which 380 | can call less specific primary methods via 381 | \FU{call-next-method}. After its return, call all \kwd{:after} 382 | methods, least specific first. 383 | } 384 | 385 | \IT{\kwd*{AND}\XOR 386 | \kwd*{OR}\XOR 387 | \kwd*{APPEND}\XOR 388 | \kwd*{LIST}\XOR \kwd*{NCONC}\XOR 389 | \kwd*{PROGN}\XOR 390 | \kwd*{MAX}\XOR 391 | \kwd*{MIN}\XOR 392 | \kwd*{+}} 393 | { 394 | Simple built-in \kwd{method-combination} types; have the same 395 | usage as the 396 | \VAR{c-type}s defined by the short form of 397 | \MC{define-method-combination}. 398 | } 399 | 400 | \IT{(\MC*{DEFINE-METHOD-COMBINATION} \VAR{c-type} 401 | \orGOO{% 402 | \kwd{:documentation } \NEV{\VAR{string}}\\ 403 | \kwd{:identity-with-one-argument} \VAR{ bool}\DF{\NIL}\\ 404 | \kwd{:operator} \VAR{ operator}\DF{\VAR{c-type}}}{\}})} 405 | { 406 | \EM{Short Form. } Define new \kwd{method-combination} 407 | \retval{\VAR{c-type}}. In a generic function using \VAR{c-type}, 408 | evaluate most specific \kwd{:around} method supplying the values of 409 | the generic function. From within this method, \FU{call-next-method} 410 | can call less specific \kwd{:around} methods if there are any. If 411 | not, or if there are no \kwd{:around} methods at all, 412 | return from the calling \kwd{call-next-method} or from the 413 | generic function, respectively, the 414 | values of (\VAR{operator} \OPn{(\VAR{primary-method} 415 | \OPn{\VAR{gen-arg}})}), \OPn{\VAR{gen-arg}} being the arguments of the 416 | generic function. 417 | The \VAR{primary-method}s are ordered 418 | \OP{\xorGOO{% 419 | \kwd{:most-specific-first}\\ 420 | \kwd{:most-specific-last}% 421 | }{\}}\DF{\kwd{:most-specific-first}}} 422 | (specified as \VAR{c-arg} in \MC{defgeneric}). 423 | Using \VAR{c-type} as the \VAR{qualifier} in \MC{defmethod} 424 | makes the method primary. 425 | } 426 | 427 | \IT{(\MC*{DEFINE-METHOD-COMBINATION} \VAR{c-type} 428 | (\OPn{\VAR{ord-$\lambda$}}) 429 | (\OPn{(\VAR{group} \xorGOO{% 430 | \kwd{\A}\\ 431 | (\OPn{\VAR{qualifier}}\text{ } \OP{\kwd{\A}})\\ 432 | \VAR{predicate}}{\}} 433 | \orGOO{% 434 | \kwd{:description} \VAR{ control}\\ 435 | \kwd{:order } 436 | \xorGOO{\kwd{:most-specific-first}\\ 437 | \kwd{:most-specific-last}}{\}}\DF{\kwd{:most-specific-first}}\\ 438 | \kwd{:required} \VAR{ bool}}{\}})}) 439 | \orGOO{% 440 | (\kwd{:arguments } \OPn{\VAR{method-combination-$\lambda$}})\\ 441 | (\kwd{:generic-function} \VAR{ symbol})\\ 442 | \orGOO{% 443 | \OPn{(\kwd{declare } \OPn{\NEV{\VAR{decl}}})}\\ 444 | \NEV{\VAR{doc}}}{\}}}{\}} 445 | \PROGN{\VAR{body}})} 446 | { 447 | \EM{Long Form. } Define new \kwd{method-combination} 448 | \retval{\VAR{c-type}}. A call to a generic function using 449 | \VAR{c-type} will be equivalent to a call to the forms returned by 450 | \OPn{\VAR{body}} with \OPn{\VAR{ord-$\lambda$}} bound to 451 | \OPn{\VAR{c-arg}} (cf.\ \MC{DEFGENERIC}), with \VAR{symbol} bound to 452 | the generic function, with \OPn{\VAR{method-combination-$\lambda$}} 453 | bound to the arguments of the generic function, and with 454 | \VAR{group}s bound to lists of methods. An applicable method becomes 455 | a member of the leftmost \VAR{group} whose \VAR{predicate} or 456 | \VAR{qualifier}s match. Methods can be called via 457 | \MC{CALL-METHOD}. Lambda lists (\OPn{\VAR{ord-$\lambda$}}) and 458 | (\OPn{\VAR{method-combination-$\lambda$}}) according to 459 | \VAR{ord-$\lambda$} on page \pageref{section:Functions}, the latter 460 | enhanced by an optional \kwd{\&whole} argument. 461 | } 462 | 463 | \IT{(\MC*{CALL-METHOD} \xorGOO{\NEV{\VAR{method}}\\ 464 | (\MC*{MAKE-METHOD}\text{ } \NEV{\VAR{form}})}{\}}% 465 | \OP{(\xorGOO{% 466 | \NEV{\VAR{next-method}}\\ 467 | (\MC*{MAKE-METHOD}\text{ } \NEV{\VAR{form}})}{\}^{\!\!*}})})} 468 | { 469 | From within an effective method form, call \VAR{method} with the 470 | arguments of the generic function and 471 | with information about its \VAR{next-method}s; return \retval{its 472 | values}. 473 | } 474 | 475 | \end{LIST} 476 | 477 | 478 | 479 | %%% Local Variables: 480 | %%% mode: latex 481 | %%% TeX-master: "clqr" 482 | %%% End: 483 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU Free Documentation License 2 | Version 1.2, November 2002 3 | 4 | 5 | Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 6 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 7 | Everyone is permitted to copy and distribute verbatim copies 8 | of this license document, but changing it is not allowed. 9 | 10 | 11 | 0. PREAMBLE 12 | 13 | The purpose of this License is to make a manual, textbook, or other 14 | functional and useful document "free" in the sense of freedom: to 15 | assure everyone the effective freedom to copy and redistribute it, 16 | with or without modifying it, either commercially or noncommercially. 17 | Secondarily, this License preserves for the author and publisher a way 18 | to get credit for their work, while not being considered responsible 19 | for modifications made by others. 20 | 21 | This License is a kind of "copyleft", which means that derivative 22 | works of the document must themselves be free in the same sense. It 23 | complements the GNU General Public License, which is a copyleft 24 | license designed for free software. 25 | 26 | We have designed this License in order to use it for manuals for free 27 | software, because free software needs free documentation: a free 28 | program should come with manuals providing the same freedoms that the 29 | software does. But this License is not limited to software manuals; 30 | it can be used for any textual work, regardless of subject matter or 31 | whether it is published as a printed book. We recommend this License 32 | principally for works whose purpose is instruction or reference. 33 | 34 | 35 | 1. APPLICABILITY AND DEFINITIONS 36 | 37 | This License applies to any manual or other work, in any medium, that 38 | contains a notice placed by the copyright holder saying it can be 39 | distributed under the terms of this License. Such a notice grants a 40 | world-wide, royalty-free license, unlimited in duration, to use that 41 | work under the conditions stated herein. The "Document", below, 42 | refers to any such manual or work. Any member of the public is a 43 | licensee, and is addressed as "you". You accept the license if you 44 | copy, modify or distribute the work in a way requiring permission 45 | under copyright law. 46 | 47 | A "Modified Version" of the Document means any work containing the 48 | Document or a portion of it, either copied verbatim, or with 49 | modifications and/or translated into another language. 50 | 51 | A "Secondary Section" is a named appendix or a front-matter section of 52 | the Document that deals exclusively with the relationship of the 53 | publishers or authors of the Document to the Document's overall subject 54 | (or to related matters) and contains nothing that could fall directly 55 | within that overall subject. (Thus, if the Document is in part a 56 | textbook of mathematics, a Secondary Section may not explain any 57 | mathematics.) The relationship could be a matter of historical 58 | connection with the subject or with related matters, or of legal, 59 | commercial, philosophical, ethical or political position regarding 60 | them. 61 | 62 | The "Invariant Sections" are certain Secondary Sections whose titles 63 | are designated, as being those of Invariant Sections, in the notice 64 | that says that the Document is released under this License. If a 65 | section does not fit the above definition of Secondary then it is not 66 | allowed to be designated as Invariant. The Document may contain zero 67 | Invariant Sections. If the Document does not identify any Invariant 68 | Sections then there are none. 69 | 70 | The "Cover Texts" are certain short passages of text that are listed, 71 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that 72 | the Document is released under this License. A Front-Cover Text may 73 | be at most 5 words, and a Back-Cover Text may be at most 25 words. 74 | 75 | A "Transparent" copy of the Document means a machine-readable copy, 76 | represented in a format whose specification is available to the 77 | general public, that is suitable for revising the document 78 | straightforwardly with generic text editors or (for images composed of 79 | pixels) generic paint programs or (for drawings) some widely available 80 | drawing editor, and that is suitable for input to text formatters or 81 | for automatic translation to a variety of formats suitable for input 82 | to text formatters. A copy made in an otherwise Transparent file 83 | format whose markup, or absence of markup, has been arranged to thwart 84 | or discourage subsequent modification by readers is not Transparent. 85 | An image format is not Transparent if used for any substantial amount 86 | of text. A copy that is not "Transparent" is called "Opaque". 87 | 88 | Examples of suitable formats for Transparent copies include plain 89 | ASCII without markup, Texinfo input format, LaTeX input format, SGML 90 | or XML using a publicly available DTD, and standard-conforming simple 91 | HTML, PostScript or PDF designed for human modification. Examples of 92 | transparent image formats include PNG, XCF and JPG. Opaque formats 93 | include proprietary formats that can be read and edited only by 94 | proprietary word processors, SGML or XML for which the DTD and/or 95 | processing tools are not generally available, and the 96 | machine-generated HTML, PostScript or PDF produced by some word 97 | processors for output purposes only. 98 | 99 | The "Title Page" means, for a printed book, the title page itself, 100 | plus such following pages as are needed to hold, legibly, the material 101 | this License requires to appear in the title page. For works in 102 | formats which do not have any title page as such, "Title Page" means 103 | the text near the most prominent appearance of the work's title, 104 | preceding the beginning of the body of the text. 105 | 106 | A section "Entitled XYZ" means a named subunit of the Document whose 107 | title either is precisely XYZ or contains XYZ in parentheses following 108 | text that translates XYZ in another language. (Here XYZ stands for a 109 | specific section name mentioned below, such as "Acknowledgements", 110 | "Dedications", "Endorsements", or "History".) To "Preserve the Title" 111 | of such a section when you modify the Document means that it remains a 112 | section "Entitled XYZ" according to this definition. 113 | 114 | The Document may include Warranty Disclaimers next to the notice which 115 | states that this License applies to the Document. These Warranty 116 | Disclaimers are considered to be included by reference in this 117 | License, but only as regards disclaiming warranties: any other 118 | implication that these Warranty Disclaimers may have is void and has 119 | no effect on the meaning of this License. 120 | 121 | 122 | 2. VERBATIM COPYING 123 | 124 | You may copy and distribute the Document in any medium, either 125 | commercially or noncommercially, provided that this License, the 126 | copyright notices, and the license notice saying this License applies 127 | to the Document are reproduced in all copies, and that you add no other 128 | conditions whatsoever to those of this License. You may not use 129 | technical measures to obstruct or control the reading or further 130 | copying of the copies you make or distribute. However, you may accept 131 | compensation in exchange for copies. If you distribute a large enough 132 | number of copies you must also follow the conditions in section 3. 133 | 134 | You may also lend copies, under the same conditions stated above, and 135 | you may publicly display copies. 136 | 137 | 138 | 3. COPYING IN QUANTITY 139 | 140 | If you publish printed copies (or copies in media that commonly have 141 | printed covers) of the Document, numbering more than 100, and the 142 | Document's license notice requires Cover Texts, you must enclose the 143 | copies in covers that carry, clearly and legibly, all these Cover 144 | Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on 145 | the back cover. Both covers must also clearly and legibly identify 146 | you as the publisher of these copies. The front cover must present 147 | the full title with all words of the title equally prominent and 148 | visible. You may add other material on the covers in addition. 149 | Copying with changes limited to the covers, as long as they preserve 150 | the title of the Document and satisfy these conditions, can be treated 151 | as verbatim copying in other respects. 152 | 153 | If the required texts for either cover are too voluminous to fit 154 | legibly, you should put the first ones listed (as many as fit 155 | reasonably) on the actual cover, and continue the rest onto adjacent 156 | pages. 157 | 158 | If you publish or distribute Opaque copies of the Document numbering 159 | more than 100, you must either include a machine-readable Transparent 160 | copy along with each Opaque copy, or state in or with each Opaque copy 161 | a computer-network location from which the general network-using 162 | public has access to download using public-standard network protocols 163 | a complete Transparent copy of the Document, free of added material. 164 | If you use the latter option, you must take reasonably prudent steps, 165 | when you begin distribution of Opaque copies in quantity, to ensure 166 | that this Transparent copy will remain thus accessible at the stated 167 | location until at least one year after the last time you distribute an 168 | Opaque copy (directly or through your agents or retailers) of that 169 | edition to the public. 170 | 171 | It is requested, but not required, that you contact the authors of the 172 | Document well before redistributing any large number of copies, to give 173 | them a chance to provide you with an updated version of the Document. 174 | 175 | 176 | 4. MODIFICATIONS 177 | 178 | You may copy and distribute a Modified Version of the Document under 179 | the conditions of sections 2 and 3 above, provided that you release 180 | the Modified Version under precisely this License, with the Modified 181 | Version filling the role of the Document, thus licensing distribution 182 | and modification of the Modified Version to whoever possesses a copy 183 | of it. In addition, you must do these things in the Modified Version: 184 | 185 | A. Use in the Title Page (and on the covers, if any) a title distinct 186 | from that of the Document, and from those of previous versions 187 | (which should, if there were any, be listed in the History section 188 | of the Document). You may use the same title as a previous version 189 | if the original publisher of that version gives permission. 190 | B. List on the Title Page, as authors, one or more persons or entities 191 | responsible for authorship of the modifications in the Modified 192 | Version, together with at least five of the principal authors of the 193 | Document (all of its principal authors, if it has fewer than five), 194 | unless they release you from this requirement. 195 | C. State on the Title page the name of the publisher of the 196 | Modified Version, as the publisher. 197 | D. Preserve all the copyright notices of the Document. 198 | E. Add an appropriate copyright notice for your modifications 199 | adjacent to the other copyright notices. 200 | F. Include, immediately after the copyright notices, a license notice 201 | giving the public permission to use the Modified Version under the 202 | terms of this License, in the form shown in the Addendum below. 203 | G. Preserve in that license notice the full lists of Invariant Sections 204 | and required Cover Texts given in the Document's license notice. 205 | H. Include an unaltered copy of this License. 206 | I. Preserve the section Entitled "History", Preserve its Title, and add 207 | to it an item stating at least the title, year, new authors, and 208 | publisher of the Modified Version as given on the Title Page. If 209 | there is no section Entitled "History" in the Document, create one 210 | stating the title, year, authors, and publisher of the Document as 211 | given on its Title Page, then add an item describing the Modified 212 | Version as stated in the previous sentence. 213 | J. Preserve the network location, if any, given in the Document for 214 | public access to a Transparent copy of the Document, and likewise 215 | the network locations given in the Document for previous versions 216 | it was based on. These may be placed in the "History" section. 217 | You may omit a network location for a work that was published at 218 | least four years before the Document itself, or if the original 219 | publisher of the version it refers to gives permission. 220 | K. For any section Entitled "Acknowledgements" or "Dedications", 221 | Preserve the Title of the section, and preserve in the section all 222 | the substance and tone of each of the contributor acknowledgements 223 | and/or dedications given therein. 224 | L. Preserve all the Invariant Sections of the Document, 225 | unaltered in their text and in their titles. Section numbers 226 | or the equivalent are not considered part of the section titles. 227 | M. Delete any section Entitled "Endorsements". Such a section 228 | may not be included in the Modified Version. 229 | N. Do not retitle any existing section to be Entitled "Endorsements" 230 | or to conflict in title with any Invariant Section. 231 | O. Preserve any Warranty Disclaimers. 232 | 233 | If the Modified Version includes new front-matter sections or 234 | appendices that qualify as Secondary Sections and contain no material 235 | copied from the Document, you may at your option designate some or all 236 | of these sections as invariant. To do this, add their titles to the 237 | list of Invariant Sections in the Modified Version's license notice. 238 | These titles must be distinct from any other section titles. 239 | 240 | You may add a section Entitled "Endorsements", provided it contains 241 | nothing but endorsements of your Modified Version by various 242 | parties--for example, statements of peer review or that the text has 243 | been approved by an organization as the authoritative definition of a 244 | standard. 245 | 246 | You may add a passage of up to five words as a Front-Cover Text, and a 247 | passage of up to 25 words as a Back-Cover Text, to the end of the list 248 | of Cover Texts in the Modified Version. Only one passage of 249 | Front-Cover Text and one of Back-Cover Text may be added by (or 250 | through arrangements made by) any one entity. If the Document already 251 | includes a cover text for the same cover, previously added by you or 252 | by arrangement made by the same entity you are acting on behalf of, 253 | you may not add another; but you may replace the old one, on explicit 254 | permission from the previous publisher that added the old one. 255 | 256 | The author(s) and publisher(s) of the Document do not by this License 257 | give permission to use their names for publicity for or to assert or 258 | imply endorsement of any Modified Version. 259 | 260 | 261 | 5. COMBINING DOCUMENTS 262 | 263 | You may combine the Document with other documents released under this 264 | License, under the terms defined in section 4 above for modified 265 | versions, provided that you include in the combination all of the 266 | Invariant Sections of all of the original documents, unmodified, and 267 | list them all as Invariant Sections of your combined work in its 268 | license notice, and that you preserve all their Warranty Disclaimers. 269 | 270 | The combined work need only contain one copy of this License, and 271 | multiple identical Invariant Sections may be replaced with a single 272 | copy. If there are multiple Invariant Sections with the same name but 273 | different contents, make the title of each such section unique by 274 | adding at the end of it, in parentheses, the name of the original 275 | author or publisher of that section if known, or else a unique number. 276 | Make the same adjustment to the section titles in the list of 277 | Invariant Sections in the license notice of the combined work. 278 | 279 | In the combination, you must combine any sections Entitled "History" 280 | in the various original documents, forming one section Entitled 281 | "History"; likewise combine any sections Entitled "Acknowledgements", 282 | and any sections Entitled "Dedications". You must delete all sections 283 | Entitled "Endorsements". 284 | 285 | 286 | 6. COLLECTIONS OF DOCUMENTS 287 | 288 | You may make a collection consisting of the Document and other documents 289 | released under this License, and replace the individual copies of this 290 | License in the various documents with a single copy that is included in 291 | the collection, provided that you follow the rules of this License for 292 | verbatim copying of each of the documents in all other respects. 293 | 294 | You may extract a single document from such a collection, and distribute 295 | it individually under this License, provided you insert a copy of this 296 | License into the extracted document, and follow this License in all 297 | other respects regarding verbatim copying of that document. 298 | 299 | 300 | 7. AGGREGATION WITH INDEPENDENT WORKS 301 | 302 | A compilation of the Document or its derivatives with other separate 303 | and independent documents or works, in or on a volume of a storage or 304 | distribution medium, is called an "aggregate" if the copyright 305 | resulting from the compilation is not used to limit the legal rights 306 | of the compilation's users beyond what the individual works permit. 307 | When the Document is included in an aggregate, this License does not 308 | apply to the other works in the aggregate which are not themselves 309 | derivative works of the Document. 310 | 311 | If the Cover Text requirement of section 3 is applicable to these 312 | copies of the Document, then if the Document is less than one half of 313 | the entire aggregate, the Document's Cover Texts may be placed on 314 | covers that bracket the Document within the aggregate, or the 315 | electronic equivalent of covers if the Document is in electronic form. 316 | Otherwise they must appear on printed covers that bracket the whole 317 | aggregate. 318 | 319 | 320 | 8. TRANSLATION 321 | 322 | Translation is considered a kind of modification, so you may 323 | distribute translations of the Document under the terms of section 4. 324 | Replacing Invariant Sections with translations requires special 325 | permission from their copyright holders, but you may include 326 | translations of some or all Invariant Sections in addition to the 327 | original versions of these Invariant Sections. You may include a 328 | translation of this License, and all the license notices in the 329 | Document, and any Warranty Disclaimers, provided that you also include 330 | the original English version of this License and the original versions 331 | of those notices and disclaimers. In case of a disagreement between 332 | the translation and the original version of this License or a notice 333 | or disclaimer, the original version will prevail. 334 | 335 | If a section in the Document is Entitled "Acknowledgements", 336 | "Dedications", or "History", the requirement (section 4) to Preserve 337 | its Title (section 1) will typically require changing the actual 338 | title. 339 | 340 | 341 | 9. TERMINATION 342 | 343 | You may not copy, modify, sublicense, or distribute the Document except 344 | as expressly provided for under this License. Any other attempt to 345 | copy, modify, sublicense or distribute the Document is void, and will 346 | automatically terminate your rights under this License. However, 347 | parties who have received copies, or rights, from you under this 348 | License will not have their licenses terminated so long as such 349 | parties remain in full compliance. 350 | 351 | 352 | 10. FUTURE REVISIONS OF THIS LICENSE 353 | 354 | The Free Software Foundation may publish new, revised versions 355 | of the GNU Free Documentation License from time to time. Such new 356 | versions will be similar in spirit to the present version, but may 357 | differ in detail to address new problems or concerns. See 358 | http://www.gnu.org/copyleft/. 359 | 360 | Each version of the License is given a distinguishing version number. 361 | If the Document specifies that a particular numbered version of this 362 | License "or any later version" applies to it, you have the option of 363 | following the terms and conditions either of that specified version or 364 | of any later version that has been published (not as a draft) by the 365 | Free Software Foundation. If the Document does not specify a version 366 | number of this License, you may choose any version ever published (not 367 | as a draft) by the Free Software Foundation. 368 | 369 | 370 | ADDENDUM: How to use this License for your documents 371 | 372 | To use this License in a document you have written, include a copy of 373 | the License in the document and put the following copyright and 374 | license notices just after the title page: 375 | 376 | Copyright (c) YEAR YOUR NAME. 377 | Permission is granted to copy, distribute and/or modify this document 378 | under the terms of the GNU Free Documentation License, Version 1.2 379 | or any later version published by the Free Software Foundation; 380 | with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. 381 | A copy of the license is included in the section entitled "GNU 382 | Free Documentation License". 383 | 384 | If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, 385 | replace the "with...Texts." line with this: 386 | 387 | with the Invariant Sections being LIST THEIR TITLES, with the 388 | Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. 389 | 390 | If you have Invariant Sections without Cover Texts, or some other 391 | combination of the three, merge those two alternatives to suit the 392 | situation. 393 | 394 | If your document contains nontrivial examples of program code, we 395 | recommend releasing these examples in parallel under your choice of 396 | free software license, such as the GNU General Public License, 397 | to permit their use in free software. 398 | --------------------------------------------------------------------------------