original_string: function expand (callable $fn, $keepOriginals = false)
    {
      $keepOriginals ? $this->intercalate ($fn) : $this->map ($fn);
      return $this->unfold ();
    }
code: function expand (callable $fn, $keepOriginals = false)
    {
      $keepOriginals ? $this->intercalate ($fn) : $this->map ($fn);
      return $this->unfold ();
    }
code_tokens: function expand ( callable $ fn , $ keepOriginals = false ) { $ keepOriginals ? $ this -> intercalate ( $ fn ) : $ this -> map ( $ fn ) ; return $ this -> unfold ( ) ; }
docstring: Expands values from the current iteration into their own iterations and provides a new iteration that concatenates
  all of them.
  
  <p>This is done by replacing each value on the current iteration by the values generated by a new iterator
  returned by a user-supplied function called for each of the original values.
  <br>This is equivalent to a `map($fn)->unfold()` operation.
  
  <p>Alternatively, by specifying `true` for the second argument, instead of each item being replaced by its
  expansion, it may instead reamain on the iteration, being the expanded values inserted between it and the next
  value on the original sequence.
  <br>That is equivalent to a `intercalate($fn)->unfold()` operation.
  
  @param callable $fn            A callback that receives the current outer iterator item's value and key and
  returns the corresponding inner iterable.
  @param bool     $keepOriginals If set, the original value is prepended to each expanded sequence.
  @return $this
docstring_tokens: Expands values from the current iteration into their own iterations and provides a new iteration that concatenates all of them .