e3.33 答案有误
Juminiy opened this issue · 0 comments
Juminiy commented
; mit-scheme 没有nil这个概念,这道题本身就是错的
(define (map p sequence)
(accumulate (lambda (x y) (cons x (p y)) ) () sequence))
; 序列反了
(define (append seq1 seq2)
(accumulate cons seq2 seq1))
; 会报错,参数少一个
(define (length sequence)
(accumulate (lambda (x) (+ x 1)) 0 sequence))