original_string: public function last($expression, $n = 1)
      {
          if (is_numeric($n) && intval($n) <= 0) {
              throw new \InvalidArgumentException('Argument $n must be whole number');
          }
          return $this->grep($expression, -intval($n));
      }
code: public function last($expression, $n = 1)
      {
          if (is_numeric($n) && intval($n) <= 0) {
              throw new \InvalidArgumentException('Argument $n must be whole number');
          }
          return $this->grep($expression, -intval($n));
      }
code_tokens: public function last ( $ expression , $ n = 1 ) { if ( is_numeric ( $ n ) && intval ( $ n ) <= 0 ) { throw new \ InvalidArgumentException ( 'Argument $n must be whole number' ) ; } return $ this -> grep ( $ expression , - intval ( $ n ) ) ; }
docstring: Return a new map containing the last N elements passing the expression.
  
  Like `first`, but stop after finding N elements from the *end*.
  Defaults to N = 1.
  
  ```
  $nums = new Map(range(0, 9));
  $odds = $nums->last('1 == ($_0 % 2)', 2); // last two odd numbers
  ```
  
  @param callable|string $expression
  @param int $n
  @return new static
  @api
docstring_tokens: Return a new map containing the last N elements passing the expression .