HH\Lib\Dict\take

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

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

Returns a new dict containing the first $n entries of the given KeyedTraversable

Description

namespace HH\Lib\Dict;

function take<Tk as arraykey, Tv>(
  KeyedTraversable<Tk, Tv> $traversable,
  int $n,
): dict<Tk, Tv>;

To drop the first $n entries, see Dict\drop().

Parameters