方案空列表表达式

Fra*_*pps 5 scheme

我正在使用http://rextester.com/runco​​de进行一些方案测试。

当我跑

(define x (cons 3 null))
(write x)
Run Code Online (Sandbox Code Playgroud)

它有一个ERROR: Unbound variable: null.

如何在上述上下文中引用空列表?

Chr*_*ung 4

(define x (cons 3 '()))
(write x)
Run Code Online (Sandbox Code Playgroud)

null或者,您可以先定义:

(define null '())
(define x (cons 3 null))
(write x)
Run Code Online (Sandbox Code Playgroud)