export function* iterFlatMap( iter: Iterable, mapper: (elm: T) => Iterable ): Generator { for (const v of iter) { yield* mapper(v); } }