I wrote http://www.dlugosz.com/Perl6/web/return.html to clarify and
extrapolate from what is written in the Synopses.
--John
1) How do you declare a private method? I see how you call one, but not how to
define one.
1b) Is the intent that $!foo without an explicit invocant refers to self, as
opposed to $.bar or .bar which refers to $_ ?
2) re: has $brain; # also declares $!brain;
Does that mean that $brain by
* Larry Wall [EMAIL PROTECTED] [2008-08-08 19:45]:
q'foo is now a valid identifier.
Qa tlho', Larry.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
John M. Dlugosz 提到:
What is the difference between (1,2,3) and [1,2,3] ?
One is a List and one is an Array; you cannot push into a list, but you
can into an array.
my @a := (1,2,3);
my @b := [1,2,3];
@a.push(4); # fails
@b.push(4); # works
Cheers,
Audrey
John M. Dlugosz wrote:
I wrote http://www.dlugosz.com/Perl6/web/return.html to clarify and
extrapolate from what is written in the Synopses.
A few comments:
1. I was under the impression that identifiers couldn't end with - or '.
2. While list context won't work with named return values, hash
Hi,
Answers as I understand things...
John M. Dlugosz wrote:
1) How do you declare a private method? I see how you call one, but
not how to define one.
my method foo { ... }
1b) Is the intent that $!foo without an explicit invocant refers to
self, as opposed to $.bar or .bar which refers
On 2008 Aug 8, at 23:12, John M. Dlugosz wrote:
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote:
On 2008 Aug 8, at 23:06, John M. Dlugosz wrote:
Why is 3;3;3 a list of captures rather than a list of lists?
IIRC it has to do with providing enough information for slices and/
or
On Fri, Aug 08, 2008 at 11:08:51PM -0400, Brandon S. Allbery KF8NH wrote:
On 2008 Aug 8, at 22:53, John M. Dlugosz wrote:
What is the difference between (1,2,3) and [1,2,3] ?
IIRC one is a list, the other a reference to a list --- which in perl6
will be hidden for the most part. so
On Fri, Aug 08, 2008 at 07:32:52AM +0200, Carl Mäsak wrote:
Jonathan ():
That this means the { $_ = uc $_; } above would end up composing a Hash
object (unless the semicolon is meant to throw a spanner in the
hash-composer works?) It says you can use sub to disambiguate, but
%ret = map