HH\Pair::concat
Returns an ImmVector
that is the concatenation of the values of the
current Pair
and the values of the provided Traversable
public function concat<Tu super mixed>(
Traversable<mixed, Tu> $traversable,
): ImmVector<mixed, Tu>;
The values of the provided Traversable
is concatenated to the end of the
current Pair
to produce the returned ImmVector
.
Guide
Parameters
Traversable<mixed,
Tu> $traversable
- TheTraversable
to concatenate to the currentPair
.
Returns
ImmVector<mixed,
Tu>
- The concatenatedImmVector
.
Examples
This example creates a new ImmVector
by concatenating a Traversable
with the values in the Pair
.
$p = Pair {'foo', -1.5};
$v = $p->concat(vec[100, 'bar']);
\var_dump($v);