HH\Asio\mm

Returns an Awaitable of Map containing after a mapping operation has been applied to each value in the provided KeyedTraversable

namespace HH\Asio;

function mm<Tk, Tv, Tr>(
  KeyedTraversable<Tk, Tv> $inputs,
  (function(Tv):Awaitable<Tr>) $callable,
): Awaitable<Map<Tk, Tr>>;

This function is similar to Map::map(), but the mapping of the values is done using Awaitables.

This function is called mm because we are returning a map, and doing a mapping operation.

$callable must return an Awaitable.

The keys and values in the Map of the returned Awaitable are not available until you await or join the returned Awaitable.

Parameters

Return Values