最初のページ 戻る 次へ 最後のページ

map2回目(巻き戻し段階)

( map square '(2 3) )

(cons (square 2) (map square '(3)) )

(cons 4 '(9) )

'( 4 9 )

(define (map f x)

(cond ((null? x) nil)

(else (cons (f (car x)) (map f (cdr x)))) ))

( map square '(2 3) )の評価は '( 4 9 )