HH\Lib\Keyset\flatten

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Keyset\flatten() in Facebook's www repository.

Returns a new keyset formed by joining the values within the given Traversables into a keyset

namespace HH\Lib\Keyset;

function flatten<Tv as arraykey>(
  Traversable<Container<Tv>> $traversables,
): keyset<Tv>;

For a fixed number of Traversables, see Keyset\union().

Time complexity: O(n), where n is the combined size of all the $traversables Space complexity: O(n), where n is the combined size of all the $traversables

Parameters

Returns

  • keyset<Tv>