wrap($arrays->arrayOf($plugins->loadClass("java.lang.Long"), 1, 2, 3, 4, 5)); // 计算累积和, 累积和: [0, 1, 3, 6, 10, 15] $numbers->runningFold(0, function ($acc, $element) { return $acc + $element; })->forEach(function ($it) use ($console) { $console->log($it); });