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

namespace HH\Asio;

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

This function is similar to mm(), but passes element keys to the callable as well.

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

This function is called mmk because we are returning a map and doing a a mapping operation that includes keys.

$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.


Return Values