Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: