User Tools


This shows you the differences between two versions of the page.

Link to this comparison view

cl:types:list [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== System Class LIST ======
 +====Class Precedence List====
 +**list**, **[[CL:​Types:​sequence]]**,​ **[[CL:​Types:​t]]**
 +A //​[[CL:​Glossary:​list]]//​ is a chain of //​[[CL:​Glossary:​conses]]//​ in which the //​[[CL:​Glossary:​car]]//​ of each //​[[CL:​Glossary:​cons]]//​ is an //​[[CL:​Glossary:​element]]//​ of the //​[[CL:​Glossary:​list]]//,​ and the //​[[CL:​Glossary:​cdr]]//​ of each //​[[CL:​Glossary:​cons]]//​ is either the next link in the chain or a terminating //​[[CL:​Glossary:​atom]]//​.
 +  * A //​[[CL:​Glossary:​proper list]]// is a chain of //​[[CL:​Glossary:​conses]]//​ terminated by the //​[[CL:​Glossary:​empty list]]//, '''​()'',​ which is  itself a //​[[CL:​Glossary:​proper list]]//.
 +  * A //​[[CL:​Glossary:​dotted list]]// is a //​[[CL:​Glossary:​list]]//​ which has a terminating //​[[CL:​Glossary:​atom]]// ​ that is not the //​[[CL:​Glossary:​empty list]]//.
 +  * A //​[[CL:​Glossary:​circular list]]// is a chain of //​[[CL:​Glossary:​conses]]//​ that has no termination because some //​[[CL:​Glossary:​cons]]//​ in the chain is the //​[[CL:​Glossary:​cdr]]//​ of a later //​[[CL:​Glossary:​cons]]//​.
 +//​[[CL:​Glossary:​Dotted lists]]// and //​[[CL:​Glossary:​circular lists]]// are also //​[[CL:​Glossary:​lists]]//,​ but usually the unqualified term "​list"​ within this specification means //​[[CL:​Glossary:​proper list]]//. Nevertheless,​ the type **[[CL:​Types:​list]]** unambiguously includes //​[[CL:​Glossary:​dotted lists]]// ​ and //​[[CL:​Glossary:​circular lists]]//.
 +For each //​[[CL:​Glossary:​element]]//​ of a //​[[CL:​Glossary:​list]]//​ there is a //​[[CL:​Glossary:​cons]]//​. The //​[[CL:​Glossary:​empty list]]// has no //​[[CL:​Glossary:​elements]]//​ and is not a //​[[CL:​Glossary:​cons]]//​.
 +The types **[[CL:​Types:​cons]]** and **[[CL:​Types:​null]]** form an //​[[CL:​Glossary:​exhaustive partition]]// ​ of the //​[[CL:​Glossary:​type]]//​ **[[CL:​Types:​list]]**.
 +====See Also====
 +{\secref\LeftParen},​ {\secref\PrintingListsAndConses}