Ejemplo n.º 1
0
 /**
  * concat
  *
  * Creates a lazily concatenated stream whose elements are all the elements
  * of the first stream followed by all the elements of the second stream.
  *
  * @param Stream $a
  * @param Stream $b
  * @return Stream
  */
 public static function concat(S\Stream $a, S\Stream $b)
 {
     $items = $a->getElements() + $b->getElements();
     return new S\Stream($items);
 }
Ejemplo n.º 2
0
 public function testConstructor()
 {
     $stream = new S\Stream($this->array);
     $this->assertTrue($stream instanceof S\Stream);
     $this->assertEquals($this->array, $stream->getElements());
 }