help on cartesianProduct()

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 11 10:05:19 PST 2016


On Sunday, 11 December 2016 at 16:34:38 UTC, Orut wrote:
> I need to be able to vary the number of ranges to feed into 
> cartesianProduct() at run time. In Python, this is possible 
> because I can dynamically construct a list of lists, then 
> unpack this list using the unpacking operator when it is fed as 
> argument to product()

  Hmmm... what kind of ranges? Are they going to be arrays? Or 
something else?

  Could make your own cartesian function range that works the same 
way, doesn't seem too complicated on that...


More information about the Digitalmars-d-learn mailing list