export default function* (it: Iterable, mapper: (val: T) => R) { for (const val of it) { yield mapper(val); } }