It seems fairly obvious to me why code-only answers are bad. However, perhaps in your case it's not. This almost perfectly highlights one of the key issues with code-only answers. You may well think it's obvious what your code now does and why it does it, but the OP / other readers may not.
Now let's stretch your example just a little further. Imagine you wrote a similar answer with three or four more lines of code. Now, when the OP scans the code it may not be obvious at all that you made that change. This may result in them coming back and saying it doesn't work, leaving you a bit baffled.
You may well argue that it's only 17 characters! However, you may well change all of those 17. Are you suggesting that there should be some sort of algorithm that picks how many characters you've written, if it's a code-only answer, how many of them correspond to the original code, how many of them have been changed, how likely this change is to be spotted, etc., etc., etc. Hopefully you get my point. Where do you draw the line?
As I say, yours seems to be a fringe case, and to 99% of readers will be seen and understood, but there are plenty out there that are only a little longer than yours where this percentage would start to drop to unsatisfactory levels.
<=
instead of<
. This should work: ..." is perfectly sufficient.is it so difficult to compare 17 chars without a hint?
It doesn't matter. You need to look beyond your specific situation. This is a huge community that deals with hundreds, if not thousands of such answers every day. We need rules that can deal with all those code-only answers, not just yours.