HH\Lib\Vec\fill
Requires the Hack Standard Library to be installed.
Facebook Engineer?
This function is available as Vec\fill()
in Facebook's www repository.
Returns a new vec of size $size
where all the values are $value
namespace HH\Lib\Vec;
function fill<Tv>(
int $size,
Tv $value,
): vec<Tv>;
Time complexity: O(n) Space complexity: O(n)
Parameters
int $size
Tv $value
Returns
vec<Tv>