original_string: public function rekey($expression)
      {
          $new = new static;
  
          $this->walk(function ($v, $k) use ($expression, $new) {
              $new_key = $this->call($expression, $v, $k);
              $new[$new_key] = $v;
          });
  
          return $new;
      }
code: public function rekey($expression)
      {
          $new = new static;
  
          $this->walk(function ($v, $k) use ($expression, $new) {
              $new_key = $this->call($expression, $v, $k);
              $new[$new_key] = $v;
          });
  
          return $new;
      }
code_tokens: public function rekey ( $ expression ) { $ new = new static ; $ this -> walk ( function ( $ v , $ k ) use ( $ expression , $ new ) { $ new_key = $ this -> call ( $ expression , $ v , $ k ) ; $ new [ $ new_key ] = $ v ; } ) ; return $ new ; }
docstring: Change the key for every element in the map using an expression to
  calculate the new key.
  
  ```
  $keyed_by_bytecode = new Map(count_chars('war of the worlds', 1));
  $keyed_by_letter   = $keyed_by_bytecode->rekey('chr($_1)');
  ```
  
  @param callable|string $expression
  @return new static
  @api
docstring_tokens: Change the key for every element in the map using an expression to calculate the new key .