4 ms·
Really is it so difficult to ignore one parameter for people reading that one liner? I could have used the underscore but honestly when I'm writing from the pho
by tigershark 10y ago
Really is it so difficult to ignore one parameter for people reading that one liner?
I could have used the underscore but honestly when I'm writing from the phone I don't usually care for small things that don't change absolutely nothing.
At least my code doesn't have the bug that skips TWO lines after the a, like the original code, and it actually saves the parsed lines in a new collection rather than throwing them away and doing nothing at all apart from burning cpu.
But for some strange reason you still prefer that obscure bug-ridden and useless imperative code rather than the self explaining and declarative functional version.
Enjoy your imperative bugs :)
- vorg 10y agoAny code that's not tested has bugs. As for reading code, when I read yours I can't work out why you put .filter{l, i -> i < 1 || lines[i - 1] != 'a'} instead of .filter{l, i -> i < 1 || lines[i - 1][0] != 'a'} to skip the line after one that begins with an 'a', or .filter{l, i -> i < 1 || lines[i - 1] != "a"} to skip the line after one that is an "a". I'd need to go run it to work out what it does.