Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLR fixes such that prob009-gerdr-feeds.pl, sseq-grondilu.pl and subs…
…-grondilu.pl pass
  • Loading branch information
stmuk committed Sep 24, 2015
1 parent 07cf4eb commit 6ee4669
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion categories/euler/prob009-gerdr-feeds.pl
Expand Up @@ -43,6 +43,6 @@
==> $result;

# print result
$result.say;
$result.[0].say;

# vim: expandtab shiftwidth=4 ft=perl6
3 changes: 2 additions & 1 deletion categories/rosalind/sseq-grondilu.pl
Expand Up @@ -25,10 +25,11 @@ ($input-file = Nil)
my ($dna, $search) = $input-file ?? $input-file.IO.lines !! @default-data;

my $pos = 0;
say gather for $search.comb -> $c {
my @arr = gather for $search.comb -> $c {
$dna ~~ m:c($pos)/$c/;
take $pos = $/.from + 1;
}
say "{@arr}"
}

# vim: expandtab shiftwidth=4 ft=perl6
3 changes: 2 additions & 1 deletion categories/rosalind/subs-grondilu.pl
Expand Up @@ -23,7 +23,8 @@

sub MAIN($input-file = Nil) {
my ($S, $t) = $input-file ?? $input-file.IO.lines !! @default-data;
say gather for $S.match(/$t/, :overlap) { take 1+.from };
my @arr = gather for $S.match(/$t/, :overlap) { take 1+.from };
say "{@arr}"
}

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit 6ee4669

Please sign in to comment.