Created
March 25, 2015 04:34
-
-
Save endobson/f410fcdca380fb855e20 to your computer and use it in GitHub Desktop.
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
| Source: | |
| (: f (Number [#:y Boolean] -> Number)) | |
| (define (f x #:y [y #f] #:z [z 'this-can-be-anything]) | |
| (if y "y is truthy" x)) | |
| Expanded inner function: | |
| '(lambda (y1 y3 z2 z4 x5) | |
| (let-values (((x) x5)) | |
| (let-values (((y) (if y3 y1 '#f))) | |
| (let-values (((z) (if z4 z2 'this-can-be-anything))) | |
| (let-values () (if y '"y is truthy" x)))))) | |
| Type we use to check it: | |
| (case-> (-> Boolean True Nothing True Number Number) (-> False False False False Number Number)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment