示例#1
0
 /**
  * Returns a fluent iterator that uses $function to generate elements
  * $function takes one argument which is the current position of the iterator.
  * @param $generator
  * @return FluentIterator
  */
 public static function fromFunction($generator)
 {
     return new self(Iterators::generate($generator));
 }