Matt Fowles wrote:

>Austin~
>
>On 9/29/05, Austin Hastings <[EMAIL PROTECTED]> wrote:
>  
>
>>Plus it's hard to talk about backwards. If you say
>>
>>for @l -> ?$prev, $curr, ?$next {...}
>>
>>what happens when you have two items in the list? I think we're best off 
>>using signature rules: optional stuff comes last.
>>    
>>
>
>I disagree, I think that is an easy call
>
>for (1, 2) -> ?$prev, $cur, ?$next {
>   say "$prev  -> $cur" if $prev;
>   say $cur;
>   say "$cur -> $next" if $next;
>   say "next";
>}
>
>should print
>
>1
>1 -> 2
>next
>1 -> 2
>2
>next
>
>  
>
Did you mean:

next
1  -> 2 # two spaces

there?

I assume so because it's the only execution path that seems to work. But
that would be assuming there was always at least one non-optional
binding. Given that Luke's against all-optional signatures, too, I'll
withdraw that part of the suggestion. And with at least one required
binding, then there's no reason that we can't have the window extend on
both sides of the current value.

Luke?

=Austin


>Matt
>--
>"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
>-Stan Kelly-Bootle, The Devil's DP Dictionary
>
>  
>

Reply via email to