To be noted: the last two exercises, 2.15 and 2.16 were left unfinished, and will be left for another time.
14 lines
241 B
Scheme
14 lines
241 B
Scheme
#lang sicp
|
|
|
|
(define one (lambda (f)
|
|
(lambda (x)
|
|
(f x))))
|
|
|
|
(define two (lambda (f)
|
|
(lambda (x)
|
|
(f (f x)))))
|
|
|
|
(define (+ a b)
|
|
(lambda (f)
|
|
(lambda (x)
|
|
((a f) ((b f) x)))))
|