now I’d like not to use take since the set can contain millions of items and I’d like not to copy all in a new set..any suggestions?
There is no constraints on the “which” X items to take..random is fine
Andrea Giuliano
06/02/2021, 10:08 AM
alternatively, I’ll be happy to move the set into a list, as long as the items won’t be copied..
u
Ulrik Rasmussen
06/02/2021, 11:19 AM
The items themselves will not be copied, only their references, so if that satisfies your constraints, then the code above is fine