How to iterate all k-subsets of a range in a specific order?
Tommi
tommitissari at hotmail.com
Fri Oct 5 02:45:46 PDT 2012
On Friday, 5 October 2012 at 09:37:51 UTC, Ali Çehreli wrote:
>
> This brings up a question: Should all range types implement
> opEquals() for "range equality" as opposed to "identity
> equality" of the underlying range (i.e. Take.source in this
> case).
But even if the range concept was altered so that all ranges have
to implement opEquals(), it wouldn't be a very satisfying
solution. That's because opEquals() could be a very slow function
for some ranges, e.g. forward ranges, where you have to check
each element's equality one by one. Using opEquals() like that
could make traversing those subset iterations very slow.
More information about the Digitalmars-d-learn
mailing list