diff options
Diffstat (limited to 'benchmark/other-lang/ack.pl')
-rw-r--r-- | benchmark/other-lang/ack.pl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/benchmark/other-lang/ack.pl b/benchmark/other-lang/ack.pl index 8933c33ae5..201e22ddfa 100644 --- a/benchmark/other-lang/ack.pl +++ b/benchmark/other-lang/ack.pl @@ -1,11 +1,11 @@ -use integer;
-
-sub Ack {
- return $_[0] ? ($_[1] ? Ack($_[0]-1, Ack($_[0], $_[1]-1))
- : Ack($_[0]-1, 1))
- : $_[1]+1;
-}
-
-my $NUM = 9;
-$NUM = 1 if ($NUM < 1);
-my $ack = Ack(3, $NUM);
+use integer; + +sub Ack { + return $_[0] ? ($_[1] ? Ack($_[0]-1, Ack($_[0], $_[1]-1)) + : Ack($_[0]-1, 1)) + : $_[1]+1; +} + +my $NUM = 9; +$NUM = 1 if ($NUM < 1); +my $ack = Ack(3, $NUM); |