export 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;
}
//# sourceMappingURL=collectByKey.js.map