HH\Asio\m

Translate a KeyedTraversable of Awaitables into a single Awaitable ofMap`

namespace HH\Asio;

function m<Tk, Tv>(
    KeyedTraversable<Tk, Awaitable<Tv>> $awaitables,
): Awaitable<Map<Tk, Tv>>;

This function takes any KeyedTraversable object of Awaitables (i.e., each member of the KeyedTraversable has a value of type of Awaitable, likely from a call to a function that returned Awaitable<T>), and transforms those Awaitables into one big Awaitable Map.

This function is called m because we are returning a map of Awaitable.

Only When you await or join the resulting Awaitable, will all of the key/values in the Map within the returned Awaitable be available.

Parameters

Return Values