original_string: public static function mapMethod (array $sequence, $method, array $arguments = array())
      {
          if (empty($arguments)) {
              $f = function ($element) use ($method) {
                  return $element->$method();
              };
          } else {
              $f = function ($element) use ($method, $arguments) {
                  return call_user_func_array(array($element, $method), $arguments);
              };
          }
          return array_map($f, $sequence);
      }
code: public static function mapMethod (array $sequence, $method, array $arguments = array())
      {
          if (empty($arguments)) {
              $f = function ($element) use ($method) {
                  return $element->$method();
              };
          } else {
              $f = function ($element) use ($method, $arguments) {
                  return call_user_func_array(array($element, $method), $arguments);
              };
          }
          return array_map($f, $sequence);
      }
code_tokens: public static function mapMethod ( array $ sequence , $ method , array $ arguments = array ( ) ) { if ( empty ( $ arguments ) ) { $ f = function ( $ element ) use ( $ method ) { return $ element -> $ method ( ) ; } ; } else { $ f = function ( $ element ) use ( $ method , $ arguments ) { return call_user_func_array ( array ( $ element , $ method ) , $ arguments ) ; } ; } return array_map ( $ f , $ sequence ) ; }
docstring: Return an array of the results of calling a method for each element of a
  sequence.
  
  @param  array $sequence Sequence of objects
  @param  string $method Name of the method
  @param  array $arguments Optional array of method arguments
  @return array Result of calling method on each element of sequence
docstring_tokens: Return an array of the results of calling a method for each element of a sequence .