first commit

This commit is contained in:
douboer
2026-09-30 15:05:17 +08:00
commit 34cf39dfe3
1288 changed files with 118174 additions and 0 deletions

20
perl/Examples/Chap5/fib-2 Normal file
View File

@@ -0,0 +1,20 @@
###
### fib2
###
## Chapter 5 section 4.3.1
sub fib {
my $n = shift;
while (1) {
if ($n < 2) {
return $n;
} else {
my $s1 = fib($n-2);
my $s2 = fib($n-1);
return $s1 + $s2;
}
}
}