Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:perl6/tablets
  • Loading branch information
lichtkind committed Aug 13, 2012
2 parents f9de7ba + 730ee66 commit 3c80c38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/appendix-e-exciting.txt
Expand Up @@ -46,8 +46,8 @@ language SIMD concurrent processing.
Perl 5 Perl 6
my $sum; my $sum = [+] @numbers;
$sum += $_ for @numbers;
for (0 .. $#factor1) { @product = @factor1 >>*<< @factor2;
$product[$] = $factor1[$] * $factor2[$_];
for (0 .. $#factor1) { @product = @factor1 »*« @factor2;
$product[$_] = $factor1[$_] * $factor2[$_];
}


Expand Down Expand Up @@ -100,15 +100,15 @@ Powerful for loops
for (my $i=15; $i>1; $i-2) {...} for 15,*-2...1 -> $i {...}
for my $key (keys %hash) { for %hash.kv -> $key, $value {
print "$key => $hash{$key}\n"; ... say "$key => $value"; ...
for my $i (0..$#a) { for zip(@a; @b; @c) -> $a, $b, $c {...}
my $a = @a[$i];
my $b = @b[$i];
my $c = @c[$i]; ...
for my $i (0..min($#a,$#b,$#c)) { for zip(@a; @b; @c) -> $a, $b, $c {...}
my $a = $a[$i];
my $b = $b[$i];
my $c = $c[$i]; ...



Named parameters in subroutines
===============================
Explicit parameters in subroutines
==================================

Perl 5 Perl 6
sub routine { sub routine ($a, $b, *@rest) {...}
Expand Down
2 changes: 1 addition & 1 deletion docs/tablet-4-operators.txt
Expand Up @@ -242,7 +242,7 @@ Combinators
Hyperops
--------

<< >>
« » << >>



Expand Down

0 comments on commit 3c80c38

Please sign in to comment.