示例#1
0
文件: pramda.php 项目: kapolos/pramda
 public function testSum()
 {
     $this->assertEquals(15, P::sum([1, 2, 3, 4, 5]));
     $a = function () {
         (yield 1);
         (yield 2);
         (yield 3);
         (yield 4);
         (yield 5);
     };
     $this->assertEquals(15, P::sum($a()));
 }