Can't iterate over range

Profile Anaysis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 4 03:31:45 PST 2017


I am trying to iterate over the combinations of a set using the 
code

https://rosettacode.org/wiki/Power_set#D

I have an array which I call powerSet on and I get a result of 
MapResult. I have tried to foreach or front/popFront and even 
each() on it but I can never get the result as the same array 
type that I started with.

What is MapResult(the algorithm that generates the result 
lazily?) and how do we easily iterate over the results like we 
would with an array?




More information about the Digitalmars-d-learn mailing list