HH\ImmVector::fromKeysOf

Creates an ImmVector from the keys of the specified container.

Description

public static function fromKeysOf(
  ?KeyedContainer<Tk,mixed> $container,
): ImmVector<Tk>

Creates an ImmVector from the keys of the specified container.

If a key of the specified container are not integers, then it adds the next available integer key in the current ImmVector and makes that key the value.

Parameters

  • ?KeyedContainer<Tk,mixed> $container - The container with the keys used to create the current ImmVector.

Return Values

Examples

See Vector::fromKeysOf for usage examples.