/** * 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); }
public function testConstructor() { $stream = new S\Stream($this->array); $this->assertTrue($stream instanceof S\Stream); $this->assertEquals($this->array, $stream->getElements()); }