Open denchat opened 5 years ago
Verifying my understanding: this view would present a range of all subsequences of the underlying range with length k
?
Yes, all possible combinations of element with length k
Perhaps, there could be 2 versions: naive version and automatic-duplicate-filtered version
I have one here: https://github.com/beojan/range-comb
permutations is similar to cartesian_product (except with k copies of the same range), but there's no good substitute for combinations in range_v3 as of yet.
It would have been really useful for advent of code this year! As it is I just used cartesian_product, which is less optimal but worked.
If not, with current specs, is it possible to implement one?
I wonder wheter it should return a range of range of item references or return a range of each current combination cache of a const container?
You may tag this as a feature request.