January 13, 2013 Re: Bidirectional range dilemma | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phil Lavoie | 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 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phil Lavoie | 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 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phil Lavoie | 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 | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | 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
|
Copyright © 1999-2021 by the D Language Foundation