I use Racket as my primary programming language and have been having fun the past week solving challenges using it. I came across a few answers from other programming languages that use TIO's header and footer options to add code outside of the main golfed code:
// Header
f=
// Code (6 bytes)
n=>n+1
// Footer
for (let i = 0; i < 10; ++i) {
console.log(f(i));
}
Isn't the f=
required for the answer to be accepted?
I also noticed a few submissions where C/++ #include
s and main
were placed in the header/footer and weren't counted.
What's the case towards Racket's #lang
statement? It is required to run Racket programs as it tells Racket's system what language to load. Does it count towards byte count? Or may I place it in the header, then explain in the answer what #lang
it uses?
I did find a question in this Meta that asks whether #lang
should count towards bytes or not, but I'm finding it confusing to choose because the two answers and their comments seem to contradict each other.
Any feedback would be appreciated.
Have an awesome week ahead!