“我的另一辆车是cdr"是什么意思?意思是? [英] What does "my other car is a cdr" mean?

查看:265
本文介绍了“我的另一辆车是cdr"是什么意思?意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何精通Lisp的人都可以向我解释这个笑话吗? 我已经阅读了一些有关功能编程语言的文章,并且知道CAR/CDR意味着地址/减量寄存器的内容,但我仍然不太了解这种幽默.

Can anyone well versed in lisp explain this joke to me? I've done some reading on functional programming languages and know that CAR/CDR mean Contents of Address/Decrement Register but I still don't really understand the humour.

推荐答案

在Lisp中,链接列表元素称为CON​​S.它是一个具有两个元素的数据结构,出于历史原因,它们被称为CAR和CDR. (一些常见的Lisp程序员更喜欢使用FIRST和REST函数来引用它们,而其他一些人喜欢使用CAR和CDR,因为它们与(CADR x)≡(CAR(CDR x))等预先编写的版本非常吻合.

In Lisp, a linked list element is called a CONS. It is a data structure with two elements, called the CAR and the CDR for historical reasons. (Some Common Lisp programmers prefer to refer to them using the FIRST and REST functions, while others like CAR and CDR because they fit well with the precomposed versions such as (CADR x) ≡ (CAR (CDR x)).

这个笑话是有时在老旧汽车上看到的保险杠贴纸的戏仿,上面写着我的另一辆汽车是保时捷/宝马/等."

The joke is a parody of the bumper stickers you sometimes see on beat-up old cars saying "My other car is a Porsche/BMW/etc."

我对这个笑话的响应一直是其他CAR是CADR.CDR根本不是CAR."

My response to this joke has always been "My other CAR is a CADR. CDR isn't a CAR at all."

这篇关于“我的另一辆车是cdr"是什么意思?意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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