Lisp Cons Cell的解释是什么? [英] What is the Definition of a Lisp Cons Cell?

查看:197
本文介绍了Lisp Cons Cell的解释是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Common Lisp Cons Cell的确切定义是什么? Cons Cell与标准链接列表项有何不同?毕竟,cons单元格和链接列表项都具有一个值以及指向下一个单元格或项的指针...还是这种理解是错误的?

What exactly is the definition of a Common Lisp Cons Cell? How is a Cons Cell different than a standard linked list item? After all, both the cons cell and the linked list item have a value and a pointer to the next cell or item... or is this understanding wrong?

推荐答案

Cons单元通常包含两个可以指向任何内容的指针.当然,一般的用法是指向左边的值",并指向右边的另一个Cons单元格(或nil).

Cons cells in general hold two pointers that can point to anything. General usage of course is to point to a "value" with the left one, and to another Cons cell (or nil) with the "right" one.

这篇关于Lisp Cons Cell的解释是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆