-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
displayln*
- a macro with similar use to python's print
#2
Comments
Thank you for entering!! Please try the form again. I clicked a button to have it start collecting entries. https://forms.gle/Z5CN2xzK13dfkBnF7 |
Reading over this again, this looks doable with just a |
Yep that's true. Here's the define syntax:
But still, it's nice to have simple useful examples to see how things like |
Please enter the bee by submitting code (or links to code) for:
Thank you for your submission!
Macro
I can easily rewrite this without using the
define-syntax-parse-rule
macro (which expands down to a call tosyntax-parse
and a bit of boilerplate), but I chose this approach because of how readable (and thus maintainable) the result is if this were used in real code.Example
Before and After
Before I would have used formats like this:
Now the same code can be written like this:
One downside is that specifying the port can't be done with the last argument anymore, but the simple workaround for that case is simply using
parameterize
on(current-output-port)
:before
after:
Licence
I confirm that the code is under the same license as the Racket language, and associated text is under Creative Commons Attribution 4.0 International License
Contact
The google form didn't work...
The text was updated successfully, but these errors were encountered: