HH\Lib\Vec\take

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

This function is available as Vec\take() in Facebook's www repository.

Returns a new vec containing the first $n elements of the given Traversable

Description

namespace HH\Lib\Vec;

function take<Tv>(
  Traversable<Tv> $traversable,
  int $n,
): vec<Tv>;

To drop the first $n elements, see Vec\drop().

Parameters