Berkeley的"CS 61A第8讲:UI递归和迭代III"说空?检查列表是否为空并且为空?检查列表是否为空或单词是否为空?讲师还接着说(null?empty)将返回false.但DrScheme根本不介意.
null之间有什么区别?空的?在Scheme?
没有区别(用我最喜欢的方言 - empty?不符合标准,而且因为我使用了任何不同的方言,所以太长了;)......!引用PLT计划文档:
(null? v) ? boolean?
v : any/c
Returns #t if v is the empty list, #f otherwise.
Run Code Online (Sandbox Code Playgroud)
和
(empty? v) ? boolean?
v : any/c
The same as (null? v).
Run Code Online (Sandbox Code Playgroud)