Newsgroups: perl.perl6.language
From: fibon...@babylonia.flatirons.org (Luke Palmer)
Date: Tue, 18 Nov 2003 07:20:52 -0700
Local: Tues, Nov 18 2003 9:20 am
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: ... ; I see this idiom a lot in code. You loop through some values on a if (0..6 ==> grep -> $t { abs(@new[$t] - @new[$t+1]) }) But one would say that's not the cleanest thing in the world. Python pulled this idiom out in to the syntax (yay them), with C<else> So, in Perl's postmodern tradition, I think we should steal that idea. for 0..6 -> $t { I'd also like to say that while converting the rest of this sub to Perl Luke You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||