HH\Lib\Vec\flatten
Requires the Hack Standard Library to be installed.
Facebook Engineer?
This function is available as Vec\flatten()
in Facebook's www repository.
Returns a new vec formed by joining the Traversable elements of the given Traversable
namespace HH\Lib\Vec;
function flatten<Tv>(
Traversable<Container<Tv>> $traversables,
): vec<Tv>;
For a fixed number of Traversables, see Vec\concat()
.
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
vec<Tv>