This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
|
export const buildDict = (fn, ...args) => {
|
|
const dict = {};
|
|
for (let [key, value] of fn(...args)) {
|
|
dict[key] = value;
|
|
}
|
|
return dict;
|
|
}
|
|
|
|
export const buildList = (fn, ...args) => {
|
|
const list = [];
|
|
for (let value of fn(...args)) {
|
|
list.push(value);
|
|
}
|
|
return list;
|
|
}
|