Skip to content

Commit c78caa8

Browse files
author
L. Grondin
committed
[rosalind] FIBD
1 parent 50cff13 commit c78caa8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rosalind/fibd-grondilu.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
my ($n, $m) = get.words;
2+
3+
my @population = 1, 0 xx ($m-1);
4+
for 1 .. $n-1 -> \n {
5+
@population.unshift: [+] @population[1..*-1]; # reproduction
6+
@population.pop; # death
7+
}
8+
9+
say [+] @population;
10+
11+
12+
# vim: ft=perl6

0 commit comments

Comments
 (0)