Skip to content

Commit 7168248

Browse files
author
grondilu
committed
Update cstr-grondilu.pl
slightly simpler code
1 parent ad9ae17 commit 7168248

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rosalind/cstr-grondilu.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
my @c = @dna[0][];
44

55
for ^@c -> $c {
6-
my $count = 0;
7-
my @line = map { $count += my $x = +so .[$c] eq @c[$c]; $x }, @dna;
8-
say @line.join if 1 < $count < @dna-1;
6+
my @line = map { +so .[$c] eq @c[$c] }, @dna;
7+
say @line.join if 1 < ([+] @line) < @dna-1;
98
}
10-
9+
1110
# vim: ft=perl6

0 commit comments

Comments
 (0)