scip练习2.22

为什么顺序会反?看看iter和cons的结构顺序就明白了
(define (square-list items)
  (define (iter things answer)
    (if (null? things)
        answer
        (cons (square (car things)) 
                    (iter (cdr things) answer))))
  (iter items '()))

你可能感兴趣的:(list,cons,iter)