Hacker News new | past | comments | ask | show | jobs | submit login

Of the three solutions, minBy is the only one likely to handle the empty sequence/database case at all gracefully. Returning a fake "zero" is particularly awful.

It probably doesn't matter much since it's a throwaway problem and the database is known not to be empty, but it bugs me.




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

Search: