original_string: public function fold(callable $func, $acc) : self
      {
          $list = $this->list;
  
          foreach ($list as $val) {
              $acc = $func($acc, $val);
          }
  
          return new static($acc);
      }
code: public function fold(callable $func, $acc) : self
      {
          $list = $this->list;
  
          foreach ($list as $val) {
              $acc = $func($acc, $val);
          }
  
          return new static($acc);
      }
code_tokens: public function fold ( callable $ func , $ acc ) : self { $ list = $ this -> list ; foreach ( $ list as $ val ) { $ acc = $ func ( $ acc , $ val ) ; } return new static ( $ acc ) ; }
docstring: fold method.
  
  @method fold
  
  @param callable $func
  @param mixed    $acc
  
  @return object Collection
docstring_tokens: fold method .