Example #1
0
 /**
  * creates an infinite sequence
  *
  * Warning: calling terminal operations on an infinite sequence result in
  * endless loops trying to calculate the terminal value. Before calling a
  * terminal operation the sequence should be limited via limit().
  * Alternatively you can iterate over the sequence itself and stop the
  * iteration when required.
  *
  *
  * @param   $seed     $seed       initial value
  * @param   callable  $operation  operation which takes a value and generates a new one
  * @return  \stubbles\sequence\Sequence
  */
 public static function infinite($seed, callable $operation) : self
 {
     return new self(Generator::infinite($seed, $operation));
 }