/usr/share/doc/nqp/examples/fib.nqp is in nqp 2013.12.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/nqp
sub fib($n) {
$n < 2 ?? $n !! fib($n-1) + fib($n - 2);
}
my $N := 29;
my $t0 := nqp::time_n();
my $z := fib($N);
my $t1 := nqp::time_n();
nqp::say("fib($N) = " ~ fib($N));
nqp::say("time = " ~ ($t1-$t0));
|