export function flatMap(value: T[], transform: (it: T) => Iterable): R[] { const result: R[] = []; for (const it of value) { result.push(...transform(it)); } return result; }