Minimiscience wrote:
> I tried to find the answers to these in the Synopses, but I couldn't.
> Plan B is to ask the mailing list.
>
> - What does the "first" method/subroutine return when no elements of
> the list match? Does it return the empty list? Does the return value
> count as un
On Sun, Jul 12, 2009 at 9:29 AM, Minimiscience wrote:
> On Jul 12, 2009, at 12:07 AM, Chas. Owens wrote:
>>
>> Since grep is defined as returning a list of matching elements and first
>> is
>> defined as being the same as grep, I would say that it returns an empty
>> list
>> if nothing matches. Th
On Jul 12, 2009, at 9:46 AM, Patrick R. Michaud wrote:
".?method" seems to work for me in Rakudo:
$ cat x
my $x = undef;
say ($x.?foo).perl;
$ ./perl6 x
undef
This doesn't work when the variable is assigned to a typed container:
#!/usr/bin/env perl6
use v6;
my Str
On Jul 12, 2009, at 12:07 AM, Chas. Owens wrote:
Since grep is defined as returning a list of matching elements and
first is
defined as being the same as grep, I would say that it returns an
empty list
if nothing matches. The empty list is one of the false values.
Does the empty list count
On Sun, Jul 12, 2009 at 12:07:14AM -0400, Chas. Owens wrote:
> On Sat, Jul 11, 2009 at 22:02, Minimiscience wrote:
> > - How does one declare multiple variables of the same type with a single
> > "my" statement? Is it "my Int ($x, $y);", "my(Int $x, Int $y);", or
> > something else? Are the pare
On Sat, Jul 11, 2009 at 22:02, Minimiscience wrote:
> I tried to find the answers to these in the Synopses, but I couldn't. Plan
> B is to ask the mailing list.
>
> - What does the "first" method/subroutine return when no elements of the
> list match? Does it return the empty list? Does the ret