Austin Hastings wrote:
> All of these have the same solution:
>
> @list = ...
> for [undef, @list[0...]] ¥ @list ¥ [@list[1...], undef] -> $last, $curr,
> $next {
> ...
> }
>
> Which is all but illegible.
Oh, no! You mean I might have to write a...subroutine!??
sub contextual (@list) {
return [undef, @list[0...]] ¥ @list ¥ [@list[1...], undef]
}
for contextual( create_list_here() ) -> $last, $curr, $next {
...
}
The horror!!!
;-)
Damian
Thread Previous
|
Thread Next