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

> so it leaves me with the uneasy feeling "what if there's a bug?"

The second solution takes me a bit longer to wrap my head around, but once I do, I like it more, because there's fewer conditionals, and so there's less chance that the function breaks on unusual conditions.

Using fewer local variables is also a nice plus.



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: