import { map } from './map.js' import { countup } from 'extra-generator' import { Awaitable } from 'justypes' export async function spawn( num: number , create: (id: number) => Awaitable ): Promise { return await map(countup(1, num), id => create(id)) }