This question already has an answer here:
- Default for Code Golf: Input/Output methods 80 answers
However, we have decided that anonymous functions are allowed. In the answer, the poster, arguing that it doesn't make sense to ban anonymous functions, says, "it wastes bytes on something rather arbitrary.
By that argument, we could remove the
s= from the beginning, leaving this:
This means that it can't just be used as a full program by itself, but it is still allowed.
Here's the problem: By our current rules, this would be disallowed:
This is taking input from a predefined variable. Arguably, however, the anonymous function header
x=> is also wasting bytes on something arbitrary. The new snippet can't be used on its own, but that's true for the anonymous function as well. It's just a matter of whether you declare the input variable in the program or not.
I understand that this is a slippery slope, but I still think this problem lacks a justified solution.
Why should taking input from a predefined variable be disallowed?