# 2.4.6.1 点对可视化

列表可以可视化成由点对构成的结构，就像多米诺骨牌。（Lisp 读取器读不懂这样的图，但是可以读懂文本记号。）下面的这个图就表示了一个包含 3 个元素的列表 ( rose violet buttercup):

```
    --- ---      --- ---      --- ---
   |   |   |--> |   |   |--> |   |   |--> nil
    --- ---      --- ---      --- ---
     |            |            |
     |            |            |
      --> rose     --> violet   --> buttercup
```

在上图中，每个格子表示一个槽，而这个槽可以指向一个 Lisp 对象。每对格子（就是两个格子）表示一个点对。其中的箭头表示这个槽指向某个 Lisp 对象。被指的对象只能是原子或另一个点对。

在这个例子里，第一个格子，也就是第一个点对的 CAR 位置，指向（或者说储存）rose（一个符号）。而第二个格子，也就是第一个点对的 CDR 位置，指向了另一对格子，也就是第二个点对。第二个点对的 CAR 指向 violet，而 CDR 指向了第三个点对。第三个（也就是最后一个）点对的 CDR 指向 nil。

这里有这个列表的另一种可视化图：

```
 ---------------       ----------------       -------------------
| car   | cdr   |     | car    | cdr   |     | car       | cdr   |
| rose  |   o-------->| violet |   o-------->| buttercup |  nil  |
|       |       |     |        |       |     |           |       |
 ---------------       ----------------       -------------------
```

没有任何元素的列表称为空列表。空列表本质上和 nil 是等价的。换句话说，nil 是一个符号，同时还是一个列表（空列表）。

下面这个例子是列表 (A ())，和 (A nil)等价：

```
    --- ---      --- ---
   |   |   |--> |   |   |--> nil
    --- ---      --- ---
     |            |
     |            |
      --> A        --> nil
```

下面这个例子会更复杂一些，它展示的是列表 ((pine needles) oak maple)：

```
    --- ---      --- ---      --- ---
   |   |   |--> |   |   |--> |   |   |--> nil
    --- ---      --- ---      --- ---
     |            |            |
     |            |            |
     |             --> oak      --> maple
     |
     |     --- ---      --- ---
      --> |   |   |--> |   |   |--> nil
           --- ---      --- ---
            |            |
            |            |
             --> pine     --> needles
```

这里有另一种画法：

```
 --------------       --------------       --------------
| car   | cdr  |     | car   | cdr  |     | car   | cdr  |
|   o   |   o------->| oak   |   o------->| maple |  nil |
|   |   |      |     |       |      |     |       |      |
 -- | ---------       --------------       --------------
    |
    |
    |        --------------       ----------------
    |       | car   | cdr  |     | car     | cdr  |
     ------>| pine  |   o------->| needles |  nil |
            |       |      |     |         |      |
             --------------       ----------------
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emacs-lisp.ivory.cafe/lisp-shu-ju-lei-xing/bian-cheng-lei-xing/2.4.6-dian-dui-lei-xing/2.4.6.1-dian-dui-ke-shi-hua.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
