Exemple #1
0
 /**
  * testRepeat().
  */
 public function testRepeat()
 {
     // infinite
     $xs = Ginq::repeat("foo")->take(3)->toArray();
     $this->assertEquals(array("foo", "foo", "foo"), $xs);
     // finite
     $xs = Ginq::repeat("foo", 3)->toArray();
     $this->assertEquals(array("foo", "foo", "foo"), $xs);
 }