Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[rosalind] FIB solution
  • Loading branch information
grondilu committed Feb 22, 2013
1 parent 1ea55bc commit cc2ca22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rosalind/fib-grondilu.pl
@@ -0,0 +1,7 @@

my ($n, $k) = get.words;
my @fib := 1, 1, * * $k + * ... *;

say @fib[$n-1];

# vim: ft=perl6
4 changes: 4 additions & 0 deletions rosalind/sexl-grondilu.pl
@@ -0,0 +1,4 @@
use v6;

say map { 2*$^x*(1-$x) }, get.split(' '.Num;

0 comments on commit cc2ca22

Please sign in to comment.