HH\Lib\Keyset\map_async

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Keyset\gen_map() in Facebook's www repository.

Returns a new keyset where the value is the result of calling the given async function on the original values in the given traversable

namespace HH\Lib\Keyset;

function map_async<Tv, Tk as arraykey>(
  Traversable<Tv> $traversable,
  (function(Tv): Awaitable<Tk>) $async_func,
): Awaitable<keyset<Tk>>;

Time complexity: O(n * f), where f is the complexity of $async_func Space complexity: O(n)

Parameters

Returns