HH\Pair::map

Returns an ImmVector containing the values after an operation has been applied to each value in the current Pair

public function map<Tu>(
  (function(mixed):Tu) $callback,
): ImmVector<Tu>;

Every value in the current Pair is affected by a call to map(), unlike filter() where only values that meet a certain criteria are affected.

Parameters

  • (function(mixed):Tu) $callback - The callback containing the operation to apply to the current Pair values.

Return Values