HH\Lib\C\first_async

Meta Engineer?

This is available as C\first_async in the www repository.

Deprecated: use C\first(await #A)

Returns the first element of the result of the given Awaitable, or null if the Traversable is empty

namespace HH\Lib\C;

function first_async<T>(
  Awaitable<Traversable<T>> $awaitable,
): Awaitable<?T>;

For non-Awaitable Traversables, see C\first.

Time complexity: O(1) Space complexity: O(1)

Parameters

Returns