"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function collectByKey(f, list) {
    const record = {};
    for (const item of list) {
        const key = f(item);
        if (!record[key]) {
            record[key] = [];
        }
        record[key].push(item);
    }
    return record;
}
exports.collectByKey = collectByKey;
//# sourceMappingURL=collectByKey.js.map