- return new PlInnerSubIterator($this->source, $this->callback, $this, $this->next);
+ if ($this->sub != null) {
+ while (!$this->sub->last()) {
+ $this->sub->next();
+ }
+ }
+
+ if ($this->last()) {
+ return null;
+ }
+
+ ++$this->pos;
+ $this->sub = new PlInnerSubIterator($this->source, $this->callback, $this, $this->next);
+ return $this->sub;