scheme - 将Scheme常量转换为等效的Common Lisp

标签 scheme common-lisp

我正在将一些Scheme 代码转换为Common Lisp。我不知道方案。我了解一点 Common Lisp。

我认为这个方案正在定义一个常量:

(define nothing #(*the-nothing*))

那个#符号在做什么?为什么它在那里?

我认为这是 Common Lisp 的等价物,但老实说我不确定:

(defconstant nothing '*the-nothing*)

最佳答案

在Scheme 和Common Lisp 中,#(...) 是向量的读取语法。在本例中,它是一个包含 1 个元素的向量,即符号 *the-nothing*

关于scheme - 将Scheme常量转换为等效的Common Lisp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37624037/

相关文章:

list - 用于检查列表是否存在重复项的 Scheme 函数

lisp - 代码错误 Lambda 表达式

common-lisp - 如何在 Common Lisp 中获取文件大小(和其他属性)?

common-lisp - 如何使用 sbcl 中的实时代码功能?

scheme - Racket - 最简洁的列表理解方式?

macos - 如何在Mac上安装MIT计划?

macros - 具有无限数量参数的 Racket 宏

scheme - "require"不适用于博士 Racket

lisp - 普通口齿不清 : Why not the array literal evaluate arguments?

debugging - 从调试器中进入 sbcl