Bucket elements into a record keyed by keyFn. Elements sharing a key are appended to the same bucket in input order.
keyFn
Dual API — works data-first or curried for use in pipe.
pipe
pipe( orders, Arrays.groupBy((o) => o.status), ) // { pending: [...], shipped: [...] } Copy
pipe( orders, Arrays.groupBy((o) => o.status), ) // { pending: [...], shipped: [...] }
Bucket elements into a record keyed by
keyFn. Elements sharing a key are appended to the same bucket in input order.Dual API — works data-first or curried for use in
pipe.