InputRange for data structure without order?
Andy Valencia
dont at spam.me
Tue Jun 3 16:03:15 UTC 2025
I have a Set data structure which has no concept of order; its
members are stored and can be searched efficiently based on their
hash.
I have a situation where chain()'ing them together would be
convenient, but InputRange requires front() and popFront().
There really _isn't_ a front, and creating a new Set with an
element removed would be unpleasant.
What would be the best way to iterate across a list of such
Set's? For now I'm just going to write the explicit loop.
Thanks!
Andy
More information about the Digitalmars-d-learn
mailing list