Returns an ImmVector containing the results of applying an operation to each value in the current ImmVector

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

map()'s result contains a value for every value in the current ImmVector; unlike filter(), where only values that meet a certain criterion are included in the resulting ImmVector.


  • (function(Tv):Tu) $callback - The callback containing the operation to apply to the current ImmVector's values.

Return Values