Created
September 26, 2012 05:24
-
-
Save monmon/3786266 to your computer and use it in GitHub Desktop.
SICP q1.42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; p.39の脚注58より | |
| ; x |-> f(g(x)) | |
| ; は | |
| ; (lambda (x) (f (g x))) | |
| (define (compose f g) | |
| (lambda (x) (f (g x)))) | |
| (define (square i) (* i i)) | |
| (define (inc i) (+ i 1)) | |
| (print ((compose square inc) 6)) ; 49 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment