Sha256: 6d05f7b7f17bf9b3dc078856a7a87161fd3ce5c2b195d29e6e5f4bddda3880c6

Contents?: true

Size: 264 Bytes

Versions: 75

Compression:

Stored size: 264 Bytes

Contents

class Raindrops is export {
    method convert (Int:D $num --> Str:D) {
       my $str = '';
       $str ~= "Pling" if $num % 3 == 0;
       $str ~= "Plang" if $num % 5 == 0;
       $str ~= "Plong" if $num % 7 == 0;
       return $str ?? $str !! $num.Str;
    }
}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
trackler-2.0.6.12 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.11 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.10 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.9 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.8 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.7 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.6 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.5 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.4 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.3 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.2 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.1 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.6.0 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.5.18 tracks/perl6/exercises/raindrops/Example.pm
trackler-2.0.5.17 tracks/perl6/exercises/raindrops/Example.pm