Hmm,
There are sevral appears in S05 which use => instead of -> in a for loop.
So, Is this a typo?
eg:
for @{$} => $pair {
say "Key: $pair[0]";
say "Val: $pair[1]";
}
Thanks,
Xinming
On Fri, Feb 03, 2006 at 03:02:12AM +0800, Yiyi Hu wrote:
: Hmm,
: There are sevral appears in S05 which use => instead of -> in a for loop.
: So, Is this a typo?
: eg:
: for @{$} => $pair {
: say "Key: $pair[0]";
: say "Val: $pair[1]";
: }
Yes, that's a typo. Thanks. It i
On Sun, Jan 29, 2006 at 08:13:44PM +, Luke Palmer wrote:
: On 1/29/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
: > Aside from that they are normal perl 6 subroutines, that simply get
: > invoked during compile time instead of during runtime.
:
: With one extra "feature". By default (my prefer
After a little more cleanup, S06 now reads:
=head2 Macros
Macros are functions or operators that are called by the compiler as
soon as their arguments are parsed (if not sooner). The syntactic
effect of a macro declaration or importation is always lexically
scoped, even if th
(from p6i)
Larry Wall wrote:
On Thu, Feb 02, 2006 at 07:12:08PM +0100, Leopold Toetsch wrote:
: >... Anyway,
: >the P6 model of "state" is more like a persistent lexical than like
: >C's static.
:
: Sorry for my dumb question - what's the difference then? (Besides that C
: dosn't have closur
On 2/3/06, Dave Whipp <[EMAIL PROTECTED]> wrote:
>sub factorial(Int $x) {
>temp state Int $result = 1;
>$result *= $x;
>factorial $x-1 if $x > 2;
>return $result if want;
>}
>say factorial 6;
That's precisely what "env" variables are for. The right way: