map = (m, f) => {
  const res = [];

  for (const [key, value] of m) {
    res.push(f(value, key));
  }

  return res;
}
Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function.

@function
@template K
@template V
@template R
@param {Map<K,V>} m
@param {function(V,K):R} f
@return {Array<R>}