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

It's common in other languages as well (at least Haskell) and a bit surprising at first. However, a `.sortBy(fn).groupBy(fn)` is easy and of similar efficiency and when you actually need the local-only `groupBy()` you're happy it's there.

A bit more expressive overall.

At least it is better than lodash' useless groupBy which creates this weird key value mapping, loses order and converts keys to string and what not.



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

Search: