export function* flatMapIndexed(value: Iterable, transform: (index: number, it: T) => Iterable): Iterable { let index = 0; for (const it of value) { yield* transform(index++, it); } }