unnecessary indirection

This commit is contained in:
Jörn-Michael Miehe 2023-12-30 16:35:21 +00:00
parent d79f7cae89
commit d09c21e3c8

View file

@ -10,7 +10,7 @@ export async function map_concurrent<In, Out>(
map_fn: (input: In) => Promise<Out | null>,
): Promise<Map<In, Out | null>> {
// apply map_fn to inputs
const outputs = await Promise.all([...inputs].map((input) => map_fn(input)));
const outputs = await Promise.all([...inputs].map(map_fn));
// create map object
return new Map<In, Out | null>(