HH\Asio\vfw

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

namespace HH\Asio;

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

This function is similar to vf(), except the Vector in the returned Awaitable contains ResultOrExceptionWrappers instead of raw values.

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

This function is called vfw because we are returning a vector, doing a filtering operation and each member of the Vector is wrapped by a ResultOrExceptionWrapper.

$callable must return an Awaitable of bool.

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

Parameters

Return Values