HH\Asio\vfk

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

namespace HH\Asio;

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

This function is similar to vf(), but passes element keys to the callable as well.

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

This function is called vfk because we are returning a vector, doing a a filtering operation that includes keys.

$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