HH\Lib\Vec\drop

Meta Engineer?

This is available as Vec\drop in the www repository.

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

namespace HH\Lib\Vec;

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

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

Time complexity: O(n), where n is the size of $traversable Space complexity: O(n), where n is the size of $traversable

Parameters

Returns

  • vec<Tv>