1
0
Fork 0
cl-sites/novaspec.org/cl/t_cons.html
2025-02-05 18:52:26 +01:00

321 lines
No EOL
6 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>cons | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="t_cons.html"
><LINK REL="next" HREF="t_atom.html" TYPE="text/html" TITLE="atom"
><LINK REL="prev" HREF="t_null.html" TYPE="text/html" TITLE="null"
><LINK REL="up" HREF="14_2_Conses_Dictionary.html" TYPE="text/html" TITLE="14.2 Conses Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="14_Conses.html"
>14. Conses</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="14_2_Conses_Dictionary.html"
>14.2 Conses Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="t_cons.html"
>cons</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="t_null.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="t_atom.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="cons"
></SPAN
><B
>cons</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>System</I
> <I
>Class</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Class Precedence List</B
></DT
><DD
><P CLASS="j"
><A HREF="t_cons.html" CLASS="typeref"
><B
>cons</B
></A
>, <A HREF="t_list.html" CLASS="typeref"
><B
>list</B
></A
>, <A HREF="t_sequence.html" CLASS="typeref"
><B
>sequence</B
></A
>, <A HREF="t_t.html" CLASS="typeref"
><B
>t</B
></A
></P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
>A <A HREF="26_1_Glossary.html#cons"
><EM CLASS="term"
>cons</EM
></A
> is a compound <A HREF="26_1_Glossary.html#object"
><EM CLASS="term"
>object</EM
></A
> having two components, called the <A HREF="26_1_Glossary.html#car"
><EM CLASS="term"
>car</EM
></A
> and <A HREF="26_1_Glossary.html#cdr"
><EM CLASS="term"
>cdr</EM
></A
>. These form a <A HREF="26_1_Glossary.html#dotted_pair"
><EM CLASS="term"
>dotted pair</EM
></A
>. Each component can be any <A HREF="26_1_Glossary.html#object"
><EM CLASS="term"
>object</EM
></A
>.</P
></DD
><DT
><B
>Compound Type Specifier Kind</B
></DT
><DD
><P CLASS="j"
>Specializing.</P
></DD
><DT
><B
>Compound Type Specifier Syntax</B
></DT
><DD
><TABLE CELLSPACING="0" CELLPADDING="0" RULES="GROUPS" STYLE="margin: 1ex 0"
><TBODY
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" STYLE=";"
><SPAN CLASS="cmtt"
>(cons</SPAN
> <SPAN CLASS="cmtt"
>[</SPAN
><SPAN CLASS="cmssi"
>car-typespec</SPAN
> <SPAN CLASS="cmr"
>[</SPAN
><SPAN CLASS="cmssi"
>cdr-typespec</SPAN
><SPAN CLASS="cmr"
>]</SPAN
><SPAN CLASS="cmtt"
>])</SPAN
></TD
></TR
></TBODY
></TABLE
></DD
><DT
><B
>Compound Type Specifier Arguments</B
></DT
><DD
><P CLASS="j"
><VAR CLASS="param"
>car-typespec</VAR
> &#8212; a <A HREF="26_1_Glossary.html#type_specifier"
><EM CLASS="term"
>type specifier</EM
></A
>, or the <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
> <SPAN CLASS="misc"
><B
>*</B
></SPAN
>. The default is the <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
> <SPAN CLASS="misc"
><B
>*</B
></SPAN
>. </P
><P CLASS="j"
><VAR CLASS="param"
>cdr-typespec</VAR
> &#8212; a <A HREF="26_1_Glossary.html#type_specifier"
><EM CLASS="term"
>type specifier</EM
></A
>, or the <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
> <SPAN CLASS="misc"
><B
>*</B
></SPAN
>. The default is the <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
> <SPAN CLASS="misc"
><B
>*</B
></SPAN
>.</P
></DD
><DT
><B
>Compound Type Specifier Description</B
></DT
><DD
><P CLASS="j"
>This denotes the set of <A HREF="26_1_Glossary.html#cons"
><EM CLASS="term"
>conses</EM
></A
> whose <A HREF="26_1_Glossary.html#car"
><EM CLASS="term"
>car</EM
></A
> is constrained to be of <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <VAR CLASS="param"
>car-typespec</VAR
> and whose <A HREF="26_1_Glossary.html#cdr"
><EM CLASS="term"
>cdr</EM
></A
> is constrained to be of <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <VAR CLASS="param"
>cdr-typespec</VAR
>. (If either <VAR CLASS="param"
>car-typespec</VAR
> or <VAR CLASS="param"
>cdr-typespec</VAR
> is <SPAN CLASS="misc"
><B
>*</B
></SPAN
>, it is as if the <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <A HREF="t_t.html" CLASS="typeref"
><B
>t</B
></A
> had been denoted.)</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="2_4_Standard_Macro_Characters.html#sec_2_4_1" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>2.4.1</SPAN
> <SPAN CLASS="cmr"
>(Left-Parenthesis)</SPAN
></A
>, <A HREF="22_1_The_Lisp_Printer.html#sec_22_1_3_5" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>22.1.3.5</SPAN
> <SPAN CLASS="cmr"
>(Printing</SPAN
> <SPAN CLASS="cmr"
>Lists</SPAN
> <SPAN CLASS="cmr"
>and</SPAN
> <SPAN CLASS="cmr"
>Conses)</SPAN
></A
></P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="t_null.html" CLASS="prev"
>&#8592;</A
><A HREF="t_atom.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>