コード例 #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()));
 }