Skip to content

Instantly share code, notes, and snippets.

@grondilu
Last active December 15, 2015 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grondilu/5296557 to your computer and use it in GitHub Desktop.
Save grondilu/5296557 to your computer and use it in GitHub Desktop.
creating a character table from genetic strings (rosalind problem)
my @dna = lines;
my @c = @dna[0].comb;
for ^@c -> $c {
my $count = 0;
my @line = map { $count += my $x = +so .comb[$c] eq @c[$c]; $x }, @dna;
say @line.join if 1 < $count < @dna-1;
}
# vim: ft=perl6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment