Lisp中"quote"的意思 [英] Meaning of 'quote in Lisp

查看:279
本文介绍了Lisp中"quote"的意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读 SICP 时出现此问题.为什么(list 'quote '(a b c))被解释器( Racket 中的 R5RS )评估为'(a b c).对我来说应该是(quote (a b c)).例如,(list 'quot '(a b c))被评估为(quot (a b c)). 'quote有什么特别之处?

This question arose when reading SICP. Why (list 'quote '(a b c)) evaluated by the interpreter (R5RS in Dr.Racket) as '(a b c). For me it should be (quote (a b c)). For instance (list 'quot '(a b c)) is evaluated as (quot (a b c)). What is so special in the 'quote?

推荐答案

我还花了一些时间来理解这个问题.但这只是您善良的lisp解释器以等价形式'(a b c)显示(quote(a b c)).由于没有这样的等价/句法糖(引号(a b c)),因此按原样显示.

It also took me a while to understand this problem. But it's just your good-hearted lisp interpreter showing (quote (a b c)) in it's equivalent form '(a b c). Since there is no such equivalence/syntactic sugar for (quott (a b c)), it's shown as is.

这篇关于Lisp中"quote"的意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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