Open Lazerbeak12345 opened 3 years ago
Thank you for entering!!
Please try the form again. I clicked a button to have it start collecting entries. https://forms.gle/Z5CN2xzK13dfkBnF7 (No idea why it stopped in the first place)
Reading over this again, this looks doable with just a define
form - no macros. I'm... not familiar enough with define to say for sure though.
Yep that's true. Here's the define syntax:
(define (displayln* . items)
(println (string-join (map ~a items) " ")))
But still, it's nice to have simple useful examples to see how things like ...
work.
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...