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