wrap($arrays->arrayOf($plugins->loadClass("java.lang.String"), "hello", "world", "kotlin")); // 将每个单词转换为字符列表,并添加索引信息, 带索引的字符列表: [0_h, 0_e, 0_l, 0_l, 0_o, 1_w, 1_o, 1_r, 1_l, 1_d, 2_k, 2_o, 2_t, 2_l, 2_i, 2_n] $words->flatMapIndexed(function ($index, $word) use ($objectWrappers) { return $objectWrappers->wrap($word)->map(function ($c) use ($index) { return $index . "_" . $c; })->getOrigin(); })->forEach(function ($it) use ($console) { $console->log($it); });