Sha256: 2e1118030097624c56bde0c360f60fe1b0f42edea6cd7eb2624e096e0a9c9370

Contents?: true

Size: 196 Bytes

Versions: 75

Compression:

Stored size: 196 Bytes

Contents

class Word_Counter is export {
    method count_words ($text) {
        my %word_counts;
        for $text.comb(/\w+/) {
            %word_counts{$_.lc}++;
        }
        %word_counts;
    }
}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
trackler-2.0.6.32 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.31 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.30 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.29 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.28 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.27 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.26 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.25 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.24 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.23 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.22 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.21 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.20 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.19 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.18 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.17 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.16 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.15 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.14 tracks/perl6/exercises/word-count/Example.pm
trackler-2.0.6.13 tracks/perl6/exercises/word-count/Example.pm