4 ms·
Any 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'} inste
by vorg 10y ago
Any 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.