wrap($arrays->arrayOf($plugins->loadClass("java.lang.Long"), 1, 2, 3, 4, 5, 6)); // 将数组分成奇数和偶数两部分 $p = $numbers->partition(function ($it) { return $it % 2 == 0; }); // 输出:偶数: [2, 4, 6] $console->log("偶数: ", $p->first); // 输出:奇数: [1, 3, 5] $console->log("奇数: ", $p->second);