Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Dr. Scheme 中处理项目时,我将一个变量初始化为 null,如下所示:
(define var null)
我怎样才能在 R5RS 中做到这一点?
在 Scheme 中,“invalid”的传统占位符是#f假对象。您可以使用not.
#f
not
(null?Scheme 中有一个检查对象是否为空列表的过程,()但是,这应该只用于列表上下文,而不是作为“无效”占位符。请注意,not仅返回 true 为#f,并且null?仅返回 true 为(); 小心不要将两者混为一谈。)
null?
()