User Tools


Differences

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

Link to this comparison view

cl:types:cons [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== System Class CONS ======
 +
 +====Class Precedence List====
 +**cons**, **[[CL:​Types:​list]]**,​ **[[CL:​Types:​sequence]]**,​ **[[CL:​Types:​t]]**
 +
 +====Description====
 +A //​[[CL:​Glossary:​cons]]//​ is a compound //​[[CL:​Glossary:​object]]//​ having two components, called the //​[[CL:​Glossary:​car]]//​ and //​[[CL:​Glossary:​cdr]]//​. These form a //​[[CL:​Glossary:​dotted pair]]//. Each component can be any //​[[CL:​Glossary:​object]]//​.
 +
 +====Compound Type Specifier Kind====
 +Specializing.
 +
 +====Compound Type Specifier Syntax====
 +//**cons** //​[car-typespec [cdr-typespec]]////​
 +
 +====Compound Type Specifier Arguments====
 +//​car-typespec//​---a //​[[CL:​Glossary:​type specifier]]//,​ or the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**. The default is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +//​cdr-typespec//​---a //​[[CL:​Glossary:​type specifier]]//,​ or the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**. The default is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +====Compound Type Specifier Description====
 +This denotes the set of //​[[CL:​Glossary:​cons|conses]]// ​ whose //​[[CL:​Glossary:​car]]//​ is constrained to be of //​[[CL:​Glossary:​type]]//​ //​car-typespec//​ and whose //​[[CL:​Glossary:​cdr]]//​ is constrained to be of //​[[CL:​Glossary:​type]]//​ //​cdr-typespec//​. (If either //​car-typespec//​ or //​cdr-typespec is **[[CL:​Types:​wildcard|*]]**, ​ it is as if the type **[[CL:​Types:​t]]** had been denoted.)
 +
 +====See Also====
 +
 +{\secref\LeftParen},​ {\secref\PrintingListsAndConses}
 +
 +\issue{CONS-TYPE-SPECIFIER:​ADD}