code: public function merge($list)
      {
          if ($list instanceof self) {
              $list = $list->nodes;
          }
  
          return new NodeList(array_merge($this->nodes, $list));
      }
docs: @param NodeList|Node[] $list
  
  @return NodeList