HH\Asio\vm

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

namespace HH\Asio;

function vm<Tv, Tr>(
    Traversable<Tv> $inputs,
  (function(Tv):Awaitable<Tr>) $callable,
): Awaitable<Vector<Tr>>;

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

This function is called vm because we are returning a vector, and we are doing a mapping operation.

$callable must return an Awaitable.

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

Parameters

Return Values