Skip to content

Commit ad9ae17

Browse files
author
grondilu
committed
Update cstr-grondilu.pl
much faster version
1 parent 03a5e4f commit ad9ae17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rosalind/cstr-grondilu.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
my @dna = lines;
1+
my @dna = map { [.comb] }, lines;
22

3-
my @c = @dna[0].comb;
3+
my @c = @dna[0][];
44

55
for ^@c -> $c {
66
my $count = 0;
7-
my @line = map { $count += my $x = +so .comb[$c] eq @c[$c]; $x }, @dna;
7+
my @line = map { $count += my $x = +so .[$c] eq @c[$c]; $x }, @dna;
88
say @line.join if 1 < $count < @dna-1;
99
}
10-
10+
1111
# vim: ft=perl6

0 commit comments

Comments
 (0)