Created
November 26, 2015 00:05
-
-
Save EmmanuelOga/9c23b5ee4ff9145fdc35 to your computer and use it in GitHub Desktop.
Desugaring sequencing (begin ...) over lambdas.
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
| #lang racket | |
| ; Desugaring sequencing (begin ...) over lambdas. | |
| (define (h _) (print "hello")) | |
| (define (w _) (print "world")) | |
| (define (seq x) | |
| (λ (y) | |
| (y (x null)))) | |
| (define (hw _) ((seq h) w)) | |
| ((seq hw) hw) ; "hello""world""hello""world" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment