Perl 6 Cool Perl 6 #83

Subroutines, non-flattening

Arrays and hashes can be passed directly without references:

sub both_elems(@a, @b) {
    say @a.elems;
    say @b.elems;
}

my @x = 1,2,3;
my @y = 4,5;
both_elems(@x, @y);   # outputs 3\n2\n
Copyright © 2010
http://www.pmichaud.com/2010/pres/