HH\Lib\C\lastx

This API is part of the Hack Standard Library, not HHVM itself.

Returns the last element of the given Traversable, or throws if the Traversable is empty

namespace HH\Lib\C;

function lastx<Tv>(
  Traversable<Tv> $traversable,
): Tv;
  • For possibly empty Traversables, see C\last.
  • For single-element Traversables, see C\onlyx.

Parameters