Build all combinations of strings
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 11 12:56:48 PST 2015
On Sunday, 11 January 2015 at 18:01:09 UTC, bearophile wrote:
>> Is doCopy really needed as an argument here?
>>
>> Couldn't this be inferred from the mutability of T instead?
>
> doCopy is useful, if it's true all the permutation arrays are
> distinct and dup-ped, otherwise they are all different. It's
> true by default, so casual users of that generator will avoid
> bugs. You can set it to false to speed up your code.
Couldn't we do a first pass and check that if elements of T are
distinct and if so set doCopy to false otherwise true?
More information about the Digitalmars-d-learn
mailing list