Last active
January 26, 2022 04:22
-
-
Save wilbowma/e26ded8af82b8b2e9c2e327b01547617 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
| #lang sweet-exp racket | |
| require (rename-in racket/base [+ r:+]) | |
| define +(e . rest) | |
| cond | |
| string? e | |
| apply string-append e rest | |
| number? e | |
| apply r:+ e rest | |
| {"Hello, " + "world." + " What have you done." + " What did you do to my parens?!"} |
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 | |
| (require (rename-in racket/base [+ r:+])) | |
| (define (+ e . rest) | |
| (cond | |
| [(string? e) | |
| (apply string-append e rest)] | |
| [(number? e) | |
| (apply r:+ e rest)])) | |
| ("Hello, " . + . "world.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing