> -----Original Message-----
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 9:21 AM
> To: Language List
> Subject: Control flow variables
> 
> 
> I was reading the most recent article on perl.com, and a code segment
> reminded me of something I see rather often in code that I don't like.
> Here's the code, Perl6ized:
> 
>     ... ;
>     my $is_ok = 1;
>     for 0..6 -> $t {
>         if abs(@new[$t] - @new[$t+1]) > 3 {
>             $is_ok = 0;
>             last;
>         }
>     }
>     if $is_ok {
>         push @moves: [$i, $j];
>     }
>     ...

This is what I was talking about when I mentioned being able to do:

  &cleanup .= { push @moves: [$i, $j]; }

a few weeks ago. Treat code vars like code, not like sub-refs.

=Austin

Reply via email to