Пример #1
0
 public function test_partition_1()
 {
     $arr = range(1, 6);
     Enumerator::partition_($arr, function ($key, $value) {
         return $value % 2 == 0;
     });
     $this->assertEquals(array(array(2, 4, 6), array(1, 3, 5)), $arr);
 }