export function forEach(collection: Iterable, fn: (v: T) => void) { for (const r of collection) { fn(r); } }