{|x| yield(@deck[x])} end def _search_by_deck(v, n) ((
[email protected]).step(@deck.size / @nproc) + [@deck.size]).each_cons(2).map {|s, e| Ractor.new(self, each_in(s...e), v, n) {|world, sub_decks, v, n| world._search_by_deck_core(sub_decks, v, n) } }.map {|r| r.take}.sum([]).max(n) end enum of subrange subrange iterator