export function* associateBy(value: Iterable, transform: (it: T) => K): Iterable<[K, T]> { for (const it of value) { yield [transform(it), it]; } }