Bidirectional range dilemma

monarch_dodra monarchdodra at gmail.com
Sun Jan 13 09:24:20 PST 2013


On Sunday, 13 January 2013 at 16:54:24 UTC, Phil Lavoie wrote:
> On Sunday, 13 January 2013 at 16:31:30 UTC, Phil Lavoie wrote:
>> Personally,
>>
>> I would have the policy implemented:
>> permutations( Policy p = Policy.forward )() {
>> ...
>> }
>>
>> And maybe extend it with aliases:
>>
>> alias fPermutations permutations!( Policy.forward );
>> alias rPermutations permutations!( Policy.backward );
>> alias biPermutations permutations!( Policy.bidirectional );
>>
>> Cheers!
>
> And of course I managed to invert alias terms again!

Just use the new syntax.

alias fPermutations  = permutations!( Policy.forward );
alias rPermutations  = permutations!( Policy.backward );
alias biPermutations = permutations!( Policy.bidirectional );


More information about the Digitalmars-d mailing list