src/Collection/Iterator/GeneratorIterator.php
public function send($value = null)
    {
        if (!$this->generator) {
            $this->rewind();
        }

        return $this->generator->send($value);
    }
public function send($value = null)
    {
        if (!$this->generator) {
            $this->rewind();
        }

        return $this->generator->send($value);
    }
public function send ( $ value = null ) { if ( ! $ this -> generator ) { $ this -> rewind ( ) ; } return $ this -> generator -> send ( $ value ) ; }
Sends a value to the generator

Sends the given value to the generator as the result of the current
yield expression and resumes execution of the generator.

If the generator is not at a yield expression when this method is
called, it will first be let to advance to the first yield expression
before sending the value. As such it is not necessary to "prime" PHP
generators with a Generator::next() call (like it is done in Python).

@param mixed $value The value

@return mixed
Sends a value to the generator