特别是为什么我们使用tailr和headr?我无法理解。
(define (foo lst)
(cond
((not (list? lst)) lst)
((null? lst) lst)
(else (let* ((tail (cdr lst))
(head (car lst))
(tailr (foo tail))
(headr (foo head)))
(append tailr (list headr))))))
答案 0 :(得分:-2)
It is equivalent to:
const