export function* map( collection: Iterable, fn: (n: I) => O ) { for (const n of collection) { yield fn(n); } }