HH\Asio\vf

Returns an Awaitable of Vector after a filtering operation has been applied to each value in the provided KeyedTraversable

namespace HH\Asio;

function vf<Tk, T>(
  KeyedTraversable<Tk, T> $inputs,
  (function(T):Awaitable<bool>) $callable,
): Awaitable<Vector<T>>;

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

This function is called vf because we are returning a vector, and we are doing a filtering operation.

$callable must return an Awaitable of bool.

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

Parameters

Return Values