View mode: basic / threaded / horizontal-split · Log in · Help
January 13, 2013
Re: Bidirectional range dilemma
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!
January 13, 2013
Re: Bidirectional range dilemma
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 );
January 13, 2013
Re: Bidirectional range dilemma
Phil Lavoie:

> And of course I managed to invert alias terms again!

Use the new syntax:

alias forwardPermutations = permutations!(CombPolicy.forward);

Bye,
bearophile
January 14, 2013
Re: Bidirectional range dilemma
On Sunday, 13 January 2013 at 17:26:16 UTC, bearophile wrote:
> Phil Lavoie:
>
>> And of course I managed to invert alias terms again!
>
> Use the new syntax:
>
> alias forwardPermutations = permutations!(CombPolicy.forward);
>
> Bye,
> bearophile

Love it
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home