(define ..
(lambda (start stop)
(cond ((> (add1 start) stop) (quote ()))
((eq? (add1 start) stop) (sub1 stop))
(else (cons start (.. (add1 start) stop))))))
Run Code Online (Sandbox Code Playgroud)
我已经定义了一个简单的范围函数.目的是为了
(.. 1 5) --> (1 2 3 4)
Run Code Online (Sandbox Code Playgroud)
相反,我的元组中添加了一个奇怪的时期,我不明白为什么:
(.. 1 5) --> (1 2 3 . 4)
Run Code Online (Sandbox Code Playgroud)
我不明白为什么会这样.任何帮助表示赞赏