예제 #1
0
 public function testFilter()
 {
     $list = new ArrayList([1, 2, 3, 4, 5, 6]);
     $list2 = $list->filter(function ($item) {
         return $item & 1;
     });
     $this->assertSame([1, 3, 5], $list2->toArray());
 }