Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Another solution
my %b is Bag = "aa.txt".IO.lines.map: -> $line {
my int @evenodd = 0,0;
++@evenodd[$_ % 2] for $line.words.skip(2).head(5);
@evenodd.join(" ");
}
for %b.sort -> (:$key, :$value) {
say "$key --> $value"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment