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

map3回目(巻き戻し段階)

( map square '(3) )

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

(cons 9 '( ) )

'( 9 )

(define (map f x)

(cond ((null? x) nil)

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

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