Austin Hastings writes: > Luke Palmer wrote: > > 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.
I'm not sure I know what you mean with regard to this example. Exemplify further, please? Luke > =Austin >