develooper Front page | perl.perl6.language | Postings from March 2010

Something about the cascade calling of sort() in rakudo.

Thread Next
From:
Hongwen Qiu
Date:
March 23, 2010 05:34
Subject:
Something about the cascade calling of sort() in rakudo.
Message ID:
4BA8B559.9050807@gmail.com
Hi, I'm new to Perl6. And just ran the first example in the perl6 book.
But, it refused to work. It complains as follows:

Too many positional parameters passed; got 2 but expected between 0 and 1

I find out that the problem is in the line:

my @sorted = @names.sort({ %sets{$_} }).sort({ %games{$_} }).reverse;

And I tried eliminate the second sort, or just the parameters in the
second sort. In both cases, it works.

So, why is this happen? Can it be a bug?

Sorry for my poor English. Hope you all understand what I'm trying to say.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About