exercise: WordCount
version: 1
plan: 12
imports: '&count-words'
tests: |
is-deeply (% = ..&count-words), |. for @($c-data);
unit: module
example: |
sub count-words (Str:D $str --> Hash:D) is export {
$str.lc.comb(/ + (\'+)? /).Bag.hash
}
stub: |
sub count-words ($str) is export {
}