public function testProduct() { $a = function () { (yield 1); (yield 2); (yield 3); (yield 4); (yield 5); }; $this->assertEquals(120, P::product($a())); }