Permalink
Browse files

Make iteration and recursion a bit longer so they measure something m…

…ore meaningful. Add iteration-for.p6.
  • Loading branch information...
1 parent b8c318b commit 42f21fad18212f1b6f4c7f512292fc850c609816 @pmichaud pmichaud committed Sep 4, 2010
Showing with 8 additions and 3 deletions.
  1. +4 −0 iteration-for.p6
  2. +1 −1 iteration.p6
  3. +3 −2 recursion.p6
View
@@ -0,0 +1,4 @@
+use v6;
+
+for 1..5000 { $_ };
+
View
@@ -1,5 +1,5 @@
use v6;
my $i = 0;
-while $i < 5 { $i++; };
+while $i < 5000 { $i++; };
View
@@ -1,4 +1,5 @@
use v6;
-sub recur($n) { say $n; recur($n-1) if $n>0; }
-recur(12);
+my $x = 0;
+sub recur($n) { say $x++; recur($n-1) if $n>0; recur($n-1) if $n>0; }
+recur(9);

0 comments on commit 42f21fa

Please sign in to comment.