Object.groupBy: Bucketing in One Call

Passenger tickets grouped in the yard: Object.groupBy, Map.groupBy or a hand-written reduce, each group a new train carrying the very same crates, and a…

The key idea

One call, fn gives each item’s key, Map for keys that are not strings

Try it in this playground