HH\Asio\v

Translate a Traversable of Awaitables into a single Awaitable of Vector

namespace HH\Asio;

function v<Tv>(
  Traversable<Awaitable<Tv>> $awaitables,
): Awaitable<Vector<Tv>>;

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

This function is called v we are returning a vector of Awaitable.

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

Parameters

Return Values