Permalink
Browse files

Update to work on Niecza.

  • Loading branch information...
1 parent 6e121e3 commit f6638a427c53605cb4869e8be642bf664ef24680 @colomon committed Dec 14, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 bin/count-words-classic.pl
  2. +1 −1 bin/count-words-keybag-new.pl
  3. +2 −2 bin/count-words-keybag.pl
  4. +1 −1 bin/count-words.pl
@@ -3,6 +3,6 @@
%words{$word}++;
}
-for %words.pairs.sort(-*.value) -> (:key($word), :value($count)) {
+for %words.pairs.sort(-*.value).map({ $_.key, $_.value }) -> $word, $count {
say "$word: $count";
}
@@ -1,5 +1,5 @@
my %words := KeyBag.new(slurp.comb(/\w+/).map(*.lc));
-for %words.pairs.sort(-*.value) -> (:key($word), :value($count)) {
+for %words.pairs.sort(-*.value).map({ $_.key, $_.value }) -> $word, $count {
say "$word: $count";
}
@@ -3,6 +3,6 @@
%words{$word}++;
}
-for %words.pairs.sort(-*.value) -> (:key($word), :value($count)) {
+for %words.pairs.sort(-*.value).map({ $_.key, $_.value }) -> $word, $count {
say "$word: $count";
-}
+}
View
@@ -1,5 +1,5 @@
my %words := bag slurp.comb(/\w+/).map(*.lc);
-for %words.pairs.sort(-*.value) -> (:key($word), :value($count)) {
+for %words.pairs.sort(-*.value).map({ $_.key, $_.value }) -> $word, $count {
say "$word: $count";
}

0 comments on commit f6638a4

Please sign in to comment.